Commit 81b1ec81 authored by Jordan Petridis's avatar Jordan Petridis 🌱

Apply clippy suggestions.

parent 074284d2
Pipeline #1872 passed with stages
in 26 minutes and 33 seconds
......@@ -139,7 +139,7 @@ pub fn get_download_folder(pd_title: &str) -> Result<String> {
/// TODO: Write Tests
/// TODO: Return Result instead
pub fn delete_show(pd: &Podcast) {
let res = dbqueries::remove_feed(&pd);
let res = dbqueries::remove_feed(pd);
if res.is_ok() {
info!("{} was removed succesfully.", pd.title());
......
......@@ -22,11 +22,9 @@ pub fn refresh_feed(headerbar: Arc<Header>, source: Option<Vec<Source>>, sender:
thread::spawn(move || {
if let Some(s) = source {
feed::index_loop(s);
} else {
if let Err(err) = feed::index_all() {
error!("Error While trying to update the database.");
error!("Error msg: {}", err);
}
} else if let Err(err) = feed::index_all() {
error!("Error While trying to update the database.");
error!("Error msg: {}", err);
};
sender.send(Action::HeaderBarHideUpdateIndicator).unwrap();
......
......@@ -154,10 +154,10 @@ impl EpisodeWidget {
fn set_date(&self, epoch: i32) {
let date = Utc.timestamp(i64::from(epoch), 0);
if NOW.year() == date.year() {
self.date.set_text(&date.format("%e %b").to_string().trim());
self.date.set_text(date.format("%e %b").to_string().trim());
} else {
self.date
.set_text(&date.format("%e %b %Y").to_string().trim());
.set_text(date.format("%e %b %Y").to_string().trim());
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment