Skip to content

Commit

Permalink
Restyled by rustfmt (#8)
Browse files Browse the repository at this point in the history
Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
restyled-io[bot] and restyled-commits authored Nov 5, 2023
1 parent 7fd9daa commit c83dba6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 5 additions & 2 deletions client/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ 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") {
Command::new("open").arg(path).spawn().unwrap();
} else {
println!("OS not supported");
}
}
}
6 changes: 3 additions & 3 deletions client/src/main.rs
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
2 changes: 0 additions & 2 deletions complex/src/complex_operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ impl ComplexOperations for Complex {
}
}


#[cfg(test)]
mod complex_tests {
use super::*;
Expand Down Expand Up @@ -111,5 +110,4 @@ mod complex_tests {
assert_eq!(a.re, -1.0);
assert_eq!(a.im, -2.0);
}

}

0 comments on commit c83dba6

Please sign in to comment.