Unwrapped value from RNG
This commit is contained in:
parent
1be5d18479
commit
368ac08449
15
src/files.rs
15
src/files.rs
@ -48,13 +48,22 @@ impl Wallpapers {
|
||||
pub fn random_selection(&self, monitor_type: MonitorType) {
|
||||
match monitor_type {
|
||||
MonitorType::Ultrawide => {
|
||||
println!("{:?}", self.ultrawide.choose(&mut rand::thread_rng()));
|
||||
println!(
|
||||
"{:?}",
|
||||
self.ultrawide.choose(&mut rand::thread_rng()).unwrap()
|
||||
);
|
||||
}
|
||||
MonitorType::Horizontal => {
|
||||
println!("{:?}", self.horizontal.choose(&mut rand::thread_rng()));
|
||||
println!(
|
||||
"{:?}",
|
||||
self.horizontal.choose(&mut rand::thread_rng()).unwrap()
|
||||
);
|
||||
}
|
||||
MonitorType::Vertical => {
|
||||
println!("{:?}", self.vertical.choose(&mut rand::thread_rng()));
|
||||
println!(
|
||||
"{:?}",
|
||||
self.vertical.choose(&mut rand::thread_rng()).unwrap()
|
||||
);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user