cargo fmt

This commit is contained in:
Jordan Petridis 2018-11-29 14:36:06 +02:00
parent fdb064ffc8
commit f9f0dad203
No known key found for this signature in database
GPG Key ID: E8523968931763BE
3 changed files with 18 additions and 18 deletions

View File

@ -138,7 +138,7 @@ pub mod xdg_dirs {
use std::path::PathBuf;
use xdg;
lazy_static!{
lazy_static! {
pub(crate) static ref PODCASTS_XDG: xdg::BaseDirectories = {
xdg::BaseDirectories::with_prefix("gnome-podcasts").unwrap()
};

View File

@ -507,22 +507,22 @@ impl PlayerWrapper {
self.controls
.pause
.connect_clicked(clone!(weak => move |_| {
weak.upgrade().map(|p| p.pause());
}));
weak.upgrade().map(|p| p.pause());
}));
// Connect the rewind button to the gst Player.
self.controls
.rewind
.connect_clicked(clone!(weak => move |_| {
weak.upgrade().map(|p| p.rewind());
}));
weak.upgrade().map(|p| p.rewind());
}));
// Connect the fast-forward button to the gst Player.
self.controls
.forward
.connect_clicked(clone!(weak => move |_| {
weak.upgrade().map(|p| p.fast_forward());
}));
weak.upgrade().map(|p| p.fast_forward());
}));
}
#[cfg_attr(rustfmt, rustfmt_skip)]

View File

@ -104,20 +104,20 @@ impl ShowMenu {
fn connect_unsub(&self, pd: &Arc<Show>, sender: &Sender<Action>) {
self.unsub
.connect_clicked(clone!(pd, sender => move |unsub| {
// hack to get away without properly checking for none.
// if pressed twice would panic.
unsub.set_sensitive(false);
// hack to get away without properly checking for none.
// if pressed twice would panic.
unsub.set_sensitive(false);
sender.send(Action::RemoveShow(pd.clone()));
sender.send(Action::RemoveShow(pd.clone()));
sender.send(Action::HeaderBarNormal);
sender.send(Action::ShowShowsAnimated);
// Queue a refresh after the switch to avoid blocking the db.
sender.send(Action::RefreshShowsView);
sender.send(Action::RefreshEpisodesView);
sender.send(Action::HeaderBarNormal);
sender.send(Action::ShowShowsAnimated);
// Queue a refresh after the switch to avoid blocking the db.
sender.send(Action::RefreshShowsView);
sender.send(Action::RefreshEpisodesView);
unsub.set_sensitive(true);
}));
unsub.set_sensitive(true);
}));
}
}