Skip to content

Instantly share code, notes, and snippets.

@bstrie
Created February 13, 2014 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bstrie/8984509 to your computer and use it in GitHub Desktop.
Save bstrie/8984509 to your computer and use it in GitHub Desktop.
fn main() {
let mut pixels = [0f32, ..8];
for &mut pixel in pixels.mut_iter() {
pixel = 2.0;
}
println!("{:?}", pixels); // [0f32, 0f32, 0f32, 0f32, 0f32, 0f32, 0f32, 0f32]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment