use rayon::prelude::*;
      
      fn main() {
        let mut arr = [0, 7, 9, 11];
        arr.par_iter_mut().for_each(|p| *p -= 1);
        println!("{:?}", arr);
      }
      

      Rust language logo
      Mutate in parallel

      Codiga's Rust Recipes

      Elements of an array

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.