Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2023-02-13 12:50:57 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-02-13 12:50:57 +0300
commit04e101c605cf93642f3ebc837ec0dbcc9b4e93d0 (patch)
treed3796e85fc308f847dfc1dd032e04d3234c98584 /utils/uriplaylistbin
parent034c0f0fd8f9c87bea0bddf50179cbe5257dfe85 (diff)
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.
Diffstat (limited to 'utils/uriplaylistbin')
-rw-r--r--utils/uriplaylistbin/src/uriplaylistbin/imp.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs
index 3b6ae3ec6..620d5cb4f 100644
--- a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs
+++ b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs
@@ -1623,14 +1623,13 @@ impl UriPlaylistBin {
blocked.set_streaming(state.streams_topology.n_streams());
}
}
- let error_msg = error.to_string();
- gst::error!(CAT, imp: self, "{}", error_msg);
+ gst::error!(CAT, imp: self, "{error}");
match error {
PlaylistError::PluginMissing { .. } => {
- gst::element_imp_error!(self, gst::CoreError::MissingPlugin, [&error_msg]);
+ gst::element_imp_error!(self, gst::CoreError::MissingPlugin, ["{error}"]);
}
- PlaylistError::ItemFailed { item, .. } => {
+ PlaylistError::ItemFailed { ref item, .. } => {
// remove failing uridecodebin
let uridecodebin = item.uridecodebin();
uridecodebin.call_async(move |uridecodebin| {
@@ -1644,7 +1643,7 @@ impl UriPlaylistBin {
gst::element_imp_error!(
self,
gst::LibraryError::Failed,
- [&error_msg],
+ ["{error}"],
details: details.build()
);
}