Compare commits

...

2 Commits

Author SHA1 Message Date
368ac08449 Unwrapped value from RNG 2024-03-10 16:31:17 +11:00
1be5d18479 Removed excess crate:: 2024-03-10 16:30:58 +11:00
2 changed files with 14 additions and 6 deletions

View File

@ -48,13 +48,22 @@ impl Wallpapers {
pub fn random_selection(&self, monitor_type: MonitorType) { pub fn random_selection(&self, monitor_type: MonitorType) {
match monitor_type { match monitor_type {
MonitorType::Ultrawide => { MonitorType::Ultrawide => {
println!("{:?}", self.ultrawide.choose(&mut rand::thread_rng())); println!(
"{:?}",
self.ultrawide.choose(&mut rand::thread_rng()).unwrap()
);
} }
MonitorType::Horizontal => { MonitorType::Horizontal => {
println!("{:?}", self.horizontal.choose(&mut rand::thread_rng())); println!(
"{:?}",
self.horizontal.choose(&mut rand::thread_rng()).unwrap()
);
} }
MonitorType::Vertical => { MonitorType::Vertical => {
println!("{:?}", self.vertical.choose(&mut rand::thread_rng())); println!(
"{:?}",
self.vertical.choose(&mut rand::thread_rng()).unwrap()
);
} }
_ => {} _ => {}
} }

View File

@ -1,9 +1,8 @@
mod config; mod config;
use crate::config::*;
mod enums; mod enums;
use crate::enums::*; use enums::*;
mod files; mod files;
use crate::files::*; use files::*;
fn main() { fn main() {
let mut wallpapers = Wallpapers::new(); let mut wallpapers = Wallpapers::new();