From c83dba6f0dd62304b298e7a831243eb1a03f0c52 Mon Sep 17 00:00:00 2001 From: "restyled-io[bot]" <32688539+restyled-io[bot]@users.noreply.github.com> Date: Sun, 5 Nov 2023 18:00:46 +0100 Subject: [PATCH] Restyled by rustfmt (#8) Co-authored-by: Restyled.io --- client/src/image.rs | 7 +++++-- client/src/main.rs | 6 +++--- complex/src/complex_operations.rs | 2 -- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/client/src/image.rs b/client/src/image.rs index d15571c..40bbb73 100644 --- a/client/src/image.rs +++ b/client/src/image.rs @@ -2,7 +2,10 @@ use std::process::Command; pub fn open_image(path: &str) -> () { if cfg!(target_os = "windows") { - Command::new("cmd").args(&["/c", "start", path]).spawn().unwrap(); + Command::new("cmd") + .args(&["/c", "start", path]) + .spawn() + .unwrap(); } else if cfg!(target_os = "linux") { Command::new("xdg-open").arg(path).spawn().unwrap(); } else if cfg!(target_os = "macos") { @@ -10,4 +13,4 @@ pub fn open_image(path: &str) -> () { } else { println!("OS not supported"); } -} \ No newline at end of file +} diff --git a/client/src/main.rs b/client/src/main.rs index 6f19654..c6f4f91 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -1,11 +1,11 @@ -mod julia; mod image; +mod julia; +use crate::image::open_image; +use crate::julia::generate_julia_set; use complex::complex_operations::ComplexOperations; use complex::julia_descriptor_impl::JuliaOperations; use shared::types::{complex::Complex, julia_descriptor::JuliaDescriptor, resolution::Resolution}; -use crate::julia::generate_julia_set; -use crate::image::open_image; fn main() { let c = Complex::new(-0.9, 0.27015); diff --git a/complex/src/complex_operations.rs b/complex/src/complex_operations.rs index 5493080..409fe40 100644 --- a/complex/src/complex_operations.rs +++ b/complex/src/complex_operations.rs @@ -38,7 +38,6 @@ impl ComplexOperations for Complex { } } - #[cfg(test)] mod complex_tests { use super::*; @@ -111,5 +110,4 @@ mod complex_tests { assert_eq!(a.re, -1.0); assert_eq!(a.im, -2.0); } - }