Skip to content

Commit

Permalink
utils: fix rust 2021 warnings
Browse files Browse the repository at this point in the history
Rust 2021 makes std::panic and core::panic identical.
This caused a bunch of warnings to pop up.
see: rust-lang/rust#81645
and: rust-lang/rust#80162

This updates the use of panic! and debug_assert to the new format.
  • Loading branch information
nee committed Apr 27, 2021
1 parent 34e0e89 commit fb338dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions podcasts-gtk/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ use crate::i18n::i18n;
macro_rules! send {
($sender:expr, $action:expr) => {
if let Err(err) = $sender.send($action) {
panic!(format!(
panic!(
"Failed to send \"{}\" action due to {}",
stringify!($action),
err
));
);
}
};
}
Expand Down Expand Up @@ -260,7 +260,7 @@ pub(crate) fn schedule_refresh(source: Option<Vec<Source>>, sender: Sender<Actio
info!("No source of feeds where found, returning");
return;
}
Err(err) => debug_assert!(false, err),
Err(err) => debug_assert!(false, "{}", err),
_ => (),
};
}
Expand Down

0 comments on commit fb338dd

Please sign in to comment.