Unwrapped value from RNG
This commit is contained in:
1 parent
1be5d18479
commit
368ac08449
1 file changed
+12
-3
+12
-3
@@ -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()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user