Skip to content

Commit fb338dd

Browse files
author
nee
committed
utils: fix rust 2021 warnings
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.
1 parent 34e0e89 commit fb338dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

podcasts-gtk/src/utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ use crate::i18n::i18n;
7373
macro_rules! send {
7474
($sender:expr, $action:expr) => {
7575
if let Err(err) = $sender.send($action) {
76-
panic!(format!(
76+
panic!(
7777
"Failed to send \"{}\" action due to {}",
7878
stringify!($action),
7979
err
80-
));
80+
);
8181
}
8282
};
8383
}
@@ -260,7 +260,7 @@ pub(crate) fn schedule_refresh(source: Option<Vec<Source>>, sender: Sender<Actio
260260
info!("No source of feeds where found, returning");
261261
return;
262262
}
263-
Err(err) => debug_assert!(false, err),
263+
Err(err) => debug_assert!(false, "{}", err),
264264
_ => (),
265265
};
266266
}

0 commit comments

Comments
 (0)