From 04e101c605cf93642f3ebc837ec0dbcc9b4e93d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 13 Feb 2023 11:50:57 +0200 Subject: Optimize various error message / debug message formatting Directly make use of format strings instead of formatting a string beforehand and then passing it to the macros. --- audio/csound/src/filter/imp.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'audio/csound/src/filter/imp.rs') diff --git a/audio/csound/src/filter/imp.rs b/audio/csound/src/filter/imp.rs index ea0fa4654..6b7a181d0 100644 --- a/audio/csound/src/filter/imp.rs +++ b/audio/csound/src/filter/imp.rs @@ -144,11 +144,11 @@ impl CsoundFilter { if let Some(ref location) = settings.location { csound .compile_csd(location) - .map_err(|e| error_msg!(gst::LibraryError::Failed, [e]))?; + .map_err(|e| error_msg!(gst::LibraryError::Failed, ["{e}"]))?; } else if let Some(ref text) = settings.csd_text { csound .compile_csd_text(text) - .map_err(|e| error_msg!(gst::LibraryError::Failed, [e]))?; + .map_err(|e| error_msg!(gst::LibraryError::Failed, ["{e}"]))?; } else { return Err(error_msg!( gst::LibraryError::Failed, @@ -470,7 +470,7 @@ impl BaseTransformImpl for CsoundFilter { csound.set_score_offset_seconds(settings.offset); if let Err(e) = csound.start() { - return Err(error_msg!(gst::LibraryError::Failed, [e])); + return Err(error_msg!(gst::LibraryError::Failed, ["{e}"])); } Ok(()) -- cgit v1.2.3