diff options
author | lamp | 2024-01-21 17:03:07 +0000 |
---|---|---|
committer | lamp | 2024-01-21 17:03:07 +0000 |
commit | 45fafbcd4b41a5388ece377c4e051b5846407288 (patch) | |
tree | 2192c471ca3b47671f0906e27f6f6088f40b3d8a /src/display/image.rs | |
parent | 89a5c9a8a0cdf627cda0e31da454f83ca21315ce (diff) |
fmt and tidy
Diffstat (limited to 'src/display/image.rs')
-rw-r--r-- | src/display/image.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/display/image.rs b/src/display/image.rs index 77d8c83..4b25cb2 100644 --- a/src/display/image.rs +++ b/src/display/image.rs @@ -1,7 +1,7 @@ use std::io::Write; -use crate::vec3::Color; use crate::display::{Display, Pixel}; +use crate::vec3::Color; pub struct Image { width: usize, @@ -39,7 +39,9 @@ impl Display for Image { } fn maybe_write(&self, output: &mut impl Write) { - output.write_fmt(format_args!("P3\n{} {}\n255\n", self.width, self.height)).unwrap(); + output + .write_fmt(format_args!("P3\n{} {}\n255\n", self.width, self.height)) + .unwrap(); for y in (0..self.height).rev() { for x in 0..self.width { let pixel = self.data.get((y * self.width) + x).unwrap(); |