From 49c6adb0db70ffc30eaac33b66eacf7574b34e26 Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 10 Feb 2021 23:06:48 +0100 Subject: Fixed most clippy warnings --- src/camera/camera.rs | 2 +- src/camera/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/camera') diff --git a/src/camera/camera.rs b/src/camera/camera.rs index 4d05e87..241d26b 100644 --- a/src/camera/camera.rs +++ b/src/camera/camera.rs @@ -79,7 +79,7 @@ impl Camera { // Calculate translation vectors let mut forward = set.target - set.origin; - let focus = set.focus.unwrap_or(forward.len()); + let focus = set.focus.unwrap_or_else(|| forward.length()); forward.norm_in(); diff --git a/src/camera/mod.rs b/src/camera/mod.rs index 7c36307..999b5b5 100644 --- a/src/camera/mod.rs +++ b/src/camera/mod.rs @@ -7,7 +7,7 @@ pub mod film; //pub mod filter; -pub mod camera; +mod camera; pub use camera::{Camera, CameraSettings}; pub use film::Film; -- cgit v1.2.3