mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 15:01:07 +00:00
Fix a couple of new Rust 1.69 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1186>
This commit is contained in:
parent
760e97c7e7
commit
cc3646640e
5 changed files with 8 additions and 9 deletions
|
@ -694,7 +694,7 @@ fn setup(
|
||||||
|
|
||||||
// Src
|
// Src
|
||||||
let src_element = glib::Object::new::<ElementSrcTest>();
|
let src_element = glib::Object::new::<ElementSrcTest>();
|
||||||
src_element.set_property("context", &context_name);
|
src_element.set_property("context", context_name);
|
||||||
pipeline.add(&src_element).unwrap();
|
pipeline.add(&src_element).unwrap();
|
||||||
|
|
||||||
let mut last_element = src_element.clone().upcast::<gst::Element>();
|
let mut last_element = src_element.clone().upcast::<gst::Element>();
|
||||||
|
|
|
@ -512,10 +512,9 @@ impl ObjectImpl for HlsSink3 {
|
||||||
}
|
}
|
||||||
"target-duration" => {
|
"target-duration" => {
|
||||||
settings.target_duration = value.get().expect("type checked upstream");
|
settings.target_duration = value.get().expect("type checked upstream");
|
||||||
settings.splitmuxsink.set_property(
|
settings
|
||||||
"max-size-time",
|
.splitmuxsink
|
||||||
&((settings.target_duration as u64).seconds()),
|
.set_property("max-size-time", (settings.target_duration as u64).seconds());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
"playlist-length" => {
|
"playlist-length" => {
|
||||||
settings.playlist_length = value.get().expect("type checked upstream");
|
settings.playlist_length = value.get().expect("type checked upstream");
|
||||||
|
@ -541,7 +540,7 @@ impl ObjectImpl for HlsSink3 {
|
||||||
settings.send_keyframe_requests = value.get().expect("type checked upstream");
|
settings.send_keyframe_requests = value.get().expect("type checked upstream");
|
||||||
settings
|
settings
|
||||||
.splitmuxsink
|
.splitmuxsink
|
||||||
.set_property("send-keyframe-requests", &settings.send_keyframe_requests);
|
.set_property("send-keyframe-requests", settings.send_keyframe_requests);
|
||||||
}
|
}
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
};
|
};
|
||||||
|
|
|
@ -549,7 +549,7 @@ fn test_cookies_property() {
|
||||||
|src| {
|
|src| {
|
||||||
src.set_property(
|
src.set_property(
|
||||||
"cookies",
|
"cookies",
|
||||||
&vec![
|
vec![
|
||||||
String::from("foo=1"),
|
String::from("foo=1"),
|
||||||
String::from("bar=2"),
|
String::from("bar=2"),
|
||||||
String::from("baz=3"),
|
String::from("baz=3"),
|
||||||
|
|
|
@ -34,7 +34,7 @@ impl Default for Signaller {
|
||||||
|
|
||||||
impl Signaller {
|
impl Signaller {
|
||||||
pub fn new(mode: WebRTCSignallerRole) -> Self {
|
pub fn new(mode: WebRTCSignallerRole) -> Self {
|
||||||
glib::Object::builder().property("role", &mode).build()
|
glib::Object::builder().property("role", mode).build()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ glib::wrapper! {
|
||||||
|
|
||||||
impl PaintableSink {
|
impl PaintableSink {
|
||||||
pub fn new(name: Option<&str>) -> Self {
|
pub fn new(name: Option<&str>) -> Self {
|
||||||
glib::Object::builder().property("name", &name).build()
|
glib::Object::builder().property("name", name).build()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue