From 58c6b67dbda1a4e10b6b4c86f392257a2e5ee1a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 12 Mar 2025 19:28:18 +0200 Subject: [PATCH] examples: webrtc: rust: Fix a couple of new clippy warnings Part-of: --- .../webrtc/multiparty-sendrecv/gst-rust/src/macos_workaround.rs | 1 - .../webrtc/sendrecv/gst-rust/src/macos_workaround.rs | 1 - subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/macos_workaround.rs b/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/macos_workaround.rs index 48b7b42dd6..f1f123b864 100644 --- a/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/macos_workaround.rs +++ b/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/macos_workaround.rs @@ -1,7 +1,6 @@ /// macOS has a specific requirement that there must be a run loop running on the main thread in /// order to open windows and use OpenGL, and that the global NSApplication instance must be /// initialized. - /// On macOS this launches the callback function on a thread. /// On other platforms it's just executed immediately. #[cfg(not(target_os = "macos"))] diff --git a/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/macos_workaround.rs b/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/macos_workaround.rs index 48b7b42dd6..f1f123b864 100644 --- a/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/macos_workaround.rs +++ b/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/macos_workaround.rs @@ -1,7 +1,6 @@ /// macOS has a specific requirement that there must be a run loop running on the main thread in /// order to open windows and use OpenGL, and that the global NSApplication instance must be /// initialized. - /// On macOS this launches the callback function on a thread. /// On other platforms it's just executed immediately. #[cfg(not(target_os = "macos"))] diff --git a/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs b/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs index 738e584859..a38c03e479 100644 --- a/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs +++ b/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs @@ -442,7 +442,7 @@ impl App { let twcc_id = media.attributes().find_map(|attr| { let key = attr.key(); let value = attr.value(); - if key != "extmap" || !value.map_or(false, |value| value.ends_with(TWCC_URI)) { + if key != "extmap" || !value.is_some_and(|value| value.ends_with(TWCC_URI)) { return None; } let value = value.unwrap();