Remove some unwraps.
This commit is contained in:
parent
3e8a8a6b85
commit
cc9fc80328
@ -278,7 +278,10 @@ impl App {
|
|||||||
let notif = InAppNotification::new(&err, callback, || {}, UndoState::Hidden);
|
let notif = InAppNotification::new(&err, callback, || {}, UndoState::Hidden);
|
||||||
notif.show(&self.overlay);
|
notif.show(&self.overlay);
|
||||||
}
|
}
|
||||||
Action::InitEpisode(rowid) => self.player.initialize_episode(rowid).unwrap(),
|
Action::InitEpisode(rowid) => {
|
||||||
|
let res = self.player.initialize_episode(rowid);
|
||||||
|
debug_assert!(res.is_ok());
|
||||||
|
}
|
||||||
Action::InitShowMenu(s) => {
|
Action::InitShowMenu(s) => {
|
||||||
let menu = s.borrow();
|
let menu = s.borrow();
|
||||||
self.headerbar.set_secondary_menu(&menu.container);
|
self.headerbar.set_secondary_menu(&menu.container);
|
||||||
|
|||||||
@ -70,9 +70,11 @@ impl Prefs {
|
|||||||
self.cleanup_type.set_active(cleanup_pos);
|
self.cleanup_type.set_active(cleanup_pos);
|
||||||
self.cleanup_type
|
self.cleanup_type
|
||||||
.connect_changed(clone!(settings, store => move |combo| {
|
.connect_changed(clone!(settings, store => move |combo| {
|
||||||
let value = store.get_value(&combo.get_active_iter().unwrap(), 0);
|
if let Some(ref treeiter) = combo.get_active_iter() {
|
||||||
let value: &str = value.get().unwrap();
|
if let Some(s) = store.get_value(treeiter, 0).get::<&str>() {
|
||||||
settings.set_string("cleanup-age-period", &value.to_lowercase());
|
settings.set_string("cleanup-age-period", &s.to_lowercase());
|
||||||
|
}
|
||||||
|
};
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user