mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 03:21:00 +00:00
Fix new Rust 1.81 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1768>
This commit is contained in:
parent
295b9f01c2
commit
a709eb96d9
4 changed files with 4 additions and 10 deletions
|
@ -541,7 +541,7 @@ unsafe impl<T: IoSafe + Write> IoSafe for std::io::BufWriter<T> {}
|
||||||
unsafe impl<T: IoSafe + Write> IoSafe for std::io::LineWriter<T> {}
|
unsafe impl<T: IoSafe + Write> IoSafe for std::io::LineWriter<T> {}
|
||||||
unsafe impl<T: IoSafe + ?Sized> IoSafe for &mut T {}
|
unsafe impl<T: IoSafe + ?Sized> IoSafe for &mut T {}
|
||||||
unsafe impl<T: IoSafe + ?Sized> IoSafe for Box<T> {}
|
unsafe impl<T: IoSafe + ?Sized> IoSafe for Box<T> {}
|
||||||
unsafe impl<T: Clone + IoSafe + ?Sized> IoSafe for std::borrow::Cow<'_, T> {}
|
unsafe impl<T: Clone + IoSafe> IoSafe for std::borrow::Cow<'_, T> {}
|
||||||
|
|
||||||
impl<T: Read + Send + 'static> AsyncRead for Async<T> {
|
impl<T: Read + Send + 'static> AsyncRead for Async<T> {
|
||||||
fn poll_read(
|
fn poll_read(
|
||||||
|
|
|
@ -218,7 +218,7 @@ fn multiple_contexts_proxy() {
|
||||||
.name(format!("proxysrc-{pipeline_index}").as_str())
|
.name(format!("proxysrc-{pipeline_index}").as_str())
|
||||||
.property(
|
.property(
|
||||||
"context",
|
"context",
|
||||||
&format!("context-{}", (pipeline_index as u32) % CONTEXT_NB),
|
format!("context-{}", (pipeline_index as u32) % CONTEXT_NB),
|
||||||
)
|
)
|
||||||
.property("proxy-context", format!("proxy-{pipeline_index}"))
|
.property("proxy-context", format!("proxy-{pipeline_index}"))
|
||||||
.build()
|
.build()
|
||||||
|
|
|
@ -74,10 +74,7 @@ impl Default for Settings {
|
||||||
cookies: Vec::new(),
|
cookies: Vec::new(),
|
||||||
iradio_mode: DEFAULT_IRADIO_MODE,
|
iradio_mode: DEFAULT_IRADIO_MODE,
|
||||||
keep_alive: DEFAULT_KEEP_ALIVE,
|
keep_alive: DEFAULT_KEEP_ALIVE,
|
||||||
proxy: match proxy_from_str(std::env::var("http_proxy").ok()) {
|
proxy: proxy_from_str(std::env::var("http_proxy").ok()).unwrap_or_default(),
|
||||||
Ok(a) => a,
|
|
||||||
Err(_) => None,
|
|
||||||
},
|
|
||||||
proxy_id: None,
|
proxy_id: None,
|
||||||
proxy_pw: None,
|
proxy_pw: None,
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,10 +159,7 @@ impl JsonGstEnc {
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
let caps = e.caps();
|
let caps = e.caps();
|
||||||
let s = caps.structure(0).unwrap();
|
let s = caps.structure(0).unwrap();
|
||||||
state.format = match s.get::<Option<String>>("format") {
|
state.format = s.get::<Option<String>>("format").unwrap_or_default();
|
||||||
Err(_) => None,
|
|
||||||
Ok(format) => format,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We send our own caps downstream
|
// We send our own caps downstream
|
||||||
|
|
Loading…
Reference in a new issue