From fb338dd48260ca910307b3bb0917dcc65f9d29f3 Mon Sep 17 00:00:00 2001 From: nee Date: Tue, 27 Apr 2021 19:57:33 +0200 Subject: [PATCH] utils: fix rust 2021 warnings Rust 2021 makes std::panic and core::panic identical. This caused a bunch of warnings to pop up. see: https://github.com/rust-lang/rust/pull/81645 and: https://github.com/rust-lang/rust/issues/80162 This updates the use of panic! and debug_assert to the new format. --- podcasts-gtk/src/utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/podcasts-gtk/src/utils.rs b/podcasts-gtk/src/utils.rs index c22ef256..c5720ed5 100644 --- a/podcasts-gtk/src/utils.rs +++ b/podcasts-gtk/src/utils.rs @@ -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 - )); + ); } }; } @@ -260,7 +260,7 @@ pub(crate) fn schedule_refresh(source: Option>, sender: Sender debug_assert!(false, err), + Err(err) => debug_assert!(false, "{}", err), _ => (), }; }