mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 08:36:31 +00:00
Add missing #[must_use] attribute for clippy
This commit is contained in:
parent
27dd305cb4
commit
ac9b1e881c
4 changed files with 11 additions and 0 deletions
|
@ -316,21 +316,29 @@ impl<'a> EncodingProfileBuilderCommonData<'a> {
|
|||
|
||||
pub trait EncodingProfileBuilder<'a>: Sized {
|
||||
#[doc(alias = "gst_encoding_profile_set_name")]
|
||||
#[must_use]
|
||||
fn name(self, name: &'a str) -> Self;
|
||||
#[doc(alias = "gst_encoding_profile_set_description")]
|
||||
#[must_use]
|
||||
fn description(self, description: &'a str) -> Self;
|
||||
#[doc(alias = "gst_encoding_profile_set_preset")]
|
||||
#[must_use]
|
||||
fn preset(self, preset: &'a str) -> Self;
|
||||
#[doc(alias = "gst_encoding_profile_set_preset_name")]
|
||||
#[must_use]
|
||||
fn preset_name(self, preset_name: &'a str) -> Self;
|
||||
#[doc(alias = "gst_encoding_profile_set_presence")]
|
||||
#[must_use]
|
||||
fn presence(self, presence: u32) -> Self;
|
||||
#[doc(alias = "gst_encoding_profile_set_allow_dynamic_output")]
|
||||
#[must_use]
|
||||
fn allow_dynamic_output(self, allow: bool) -> Self;
|
||||
#[doc(alias = "gst_encoding_profile_set_enabled")]
|
||||
#[must_use]
|
||||
fn enabled(self, enabled: bool) -> Self;
|
||||
#[cfg(feature = "v1_18")]
|
||||
#[doc(alias = "gst_encoding_profile_set_single_segment")]
|
||||
#[must_use]
|
||||
fn single_segment(self, single_segment: bool) -> Self;
|
||||
}
|
||||
|
||||
|
|
|
@ -644,6 +644,7 @@ impl ToValue for MessageType {
|
|||
}
|
||||
|
||||
impl State {
|
||||
#[must_use]
|
||||
pub fn next(self, pending: Self) -> Self {
|
||||
let current = self.into_glib();
|
||||
let pending = pending.into_glib();
|
||||
|
|
|
@ -66,6 +66,7 @@ where
|
|||
}
|
||||
|
||||
#[doc(alias = "gst_iterator_filter")]
|
||||
#[must_use]
|
||||
pub fn filter<F>(self, func: F) -> Self
|
||||
where
|
||||
F: Fn(T) -> bool + Send + Sync + 'static,
|
||||
|
|
|
@ -92,6 +92,7 @@ macro_rules! mini_object_wrapper (
|
|||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn upcast(self) -> $crate::miniobject::MiniObject {
|
||||
unsafe {
|
||||
from_glib_full(self.into_ptr() as *mut $crate::ffi::GstMiniObject)
|
||||
|
|
Loading…
Reference in a new issue