diff --git a/generic/threadshare/src/runtime/executor/async_wrapper.rs b/generic/threadshare/src/runtime/executor/async_wrapper.rs index 472050288..333a73b94 100644 --- a/generic/threadshare/src/runtime/executor/async_wrapper.rs +++ b/generic/threadshare/src/runtime/executor/async_wrapper.rs @@ -541,7 +541,7 @@ unsafe impl IoSafe for std::io::BufWriter {} unsafe impl IoSafe for std::io::LineWriter {} unsafe impl IoSafe for &mut T {} unsafe impl IoSafe for Box {} -unsafe impl IoSafe for std::borrow::Cow<'_, T> {} +unsafe impl IoSafe for std::borrow::Cow<'_, T> {} impl AsyncRead for Async { fn poll_read( diff --git a/generic/threadshare/tests/pipeline.rs b/generic/threadshare/tests/pipeline.rs index 2735df8f5..afb9c895e 100644 --- a/generic/threadshare/tests/pipeline.rs +++ b/generic/threadshare/tests/pipeline.rs @@ -218,7 +218,7 @@ fn multiple_contexts_proxy() { .name(format!("proxysrc-{pipeline_index}").as_str()) .property( "context", - &format!("context-{}", (pipeline_index as u32) % CONTEXT_NB), + format!("context-{}", (pipeline_index as u32) % CONTEXT_NB), ) .property("proxy-context", format!("proxy-{pipeline_index}")) .build() diff --git a/net/reqwest/src/reqwesthttpsrc/imp.rs b/net/reqwest/src/reqwesthttpsrc/imp.rs index ffab44824..ec0cfafb1 100644 --- a/net/reqwest/src/reqwesthttpsrc/imp.rs +++ b/net/reqwest/src/reqwesthttpsrc/imp.rs @@ -74,10 +74,7 @@ impl Default for Settings { cookies: Vec::new(), iradio_mode: DEFAULT_IRADIO_MODE, keep_alive: DEFAULT_KEEP_ALIVE, - proxy: match proxy_from_str(std::env::var("http_proxy").ok()) { - Ok(a) => a, - Err(_) => None, - }, + proxy: proxy_from_str(std::env::var("http_proxy").ok()).unwrap_or_default(), proxy_id: None, proxy_pw: None, } diff --git a/text/json/src/jsongstenc/imp.rs b/text/json/src/jsongstenc/imp.rs index cd57d461a..3451605ed 100644 --- a/text/json/src/jsongstenc/imp.rs +++ b/text/json/src/jsongstenc/imp.rs @@ -159,10 +159,7 @@ impl JsonGstEnc { let mut state = self.state.lock().unwrap(); let caps = e.caps(); let s = caps.structure(0).unwrap(); - state.format = match s.get::>("format") { - Err(_) => None, - Ok(format) => format, - }; + state.format = s.get::>("format").unwrap_or_default(); } // We send our own caps downstream