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) {
|
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()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user