From eab619bd5cfc520d3962097d16582eae6977d6dc Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 26 Oct 2023 21:05:34 +0200 Subject: style: increase max struct literal width to 36 --- src/main.rs | 77 +++++++++++-------------------------------------------------- 1 file changed, 13 insertions(+), 64 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index ad59b38..eb89fef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,16 +8,9 @@ use engine::{Engine, Key, WindowSize}; use tracing::Level; use tracing_subscriber::FmtSubscriber; -const WINDOW_SIZE: WindowSize = WindowSize { - width: 500, - height: 600, -}; +const WINDOW_SIZE: WindowSize = WindowSize { width: 500, height: 600 }; -const BLUE: Color = Color { - red: 0.0, - blue: 1.0, - green: 0.0, -}; +const BLUE: Color = Color { red: 0.0, blue: 1.0, green: 0.0 }; fn main() -> Result<(), Box> { @@ -33,53 +26,25 @@ fn main() -> Result<(), Box> ObjectId::new(1), &[ VertexBuilder::new() - .pos(Vec3 { - x: -0.5, - y: -0.5, - z: 0.0, - }) - .color(Color { - red: 1.0, - green: 0.0, - blue: 0.0, - }) + .pos(Vec3 { x: -0.5, y: -0.5, z: 0.0 }) + .color(Color { red: 1.0, green: 0.0, blue: 0.0 }) .build() .unwrap(), VertexBuilder::new() - .pos(Vec3 { - x: 0.5, - y: -0.5, - z: 0.0, - }) - .color(Color { - red: 0.0, - green: 1.0, - blue: 0.0, - }) + .pos(Vec3 { x: 0.5, y: -0.5, z: 0.0 }) + .color(Color { red: 0.0, green: 1.0, blue: 0.0 }) .build() .unwrap(), VertexBuilder::new() - .pos(Vec3 { - x: 0.0, - y: 0.5, - z: 0.0, - }) - .color(Color { - red: 0.0, - green: 0.0, - blue: 1.0, - }) + .pos(Vec3 { x: 0.0, y: 0.5, z: 0.0 }) + .color(Color { red: 0.0, green: 0.0, blue: 1.0 }) .build() .unwrap(), ], None, )?; - triangle.translate(Vec3 { - x: 0.0, - y: 0.4, - z: 0.0, - }); + triangle.translate(Vec3 { x: 0.0, y: 0.4, z: 0.0 }); engine.add_object(triangle); @@ -87,38 +52,22 @@ fn main() -> Result<(), Box> ObjectId::new(2), &[ VertexBuilder::new() - .pos(Vec3 { - x: 0.5, - y: 0.5, - z: 0.0, - }) + .pos(Vec3 { x: 0.5, y: 0.5, z: 0.0 }) .color(BLUE) .build() .unwrap(), VertexBuilder::new() - .pos(Vec3 { - x: 0.5, - y: -0.5, - z: 0.0, - }) + .pos(Vec3 { x: 0.5, y: -0.5, z: 0.0 }) .color(BLUE) .build() .unwrap(), VertexBuilder::new() - .pos(Vec3 { - x: -0.5, - y: -0.5, - z: 0.0, - }) + .pos(Vec3 { x: -0.5, y: -0.5, z: 0.0 }) .color(BLUE) .build() .unwrap(), VertexBuilder::new() - .pos(Vec3 { - x: -0.5, - y: 0.5, - z: 0.0, - }) + .pos(Vec3 { x: -0.5, y: 0.5, z: 0.0 }) .color(BLUE) .build() .unwrap(), -- cgit v1.2.3-18-g5258