mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41:05 +00:00
Mark various enums that can signal errors as #[must_use]
See https://github.com/sdroege/gstreamer-rs/issues/44
This commit is contained in:
parent
3179806f01
commit
e8638c1630
2 changed files with 24 additions and 4 deletions
24
Gir_Gst.toml
24
Gir_Gst.toml
|
@ -18,11 +18,9 @@ generate = [
|
|||
"Gst.ClockTimeDiff",
|
||||
"Gst.Pipeline",
|
||||
"Gst.State",
|
||||
"Gst.StateChangeReturn",
|
||||
"Gst.StateChange",
|
||||
"Gst.SeekFlags",
|
||||
"Gst.SeekType",
|
||||
"Gst.FlowReturn",
|
||||
"Gst.PadDirection",
|
||||
"Gst.PadPresence",
|
||||
"Gst.URIHandler",
|
||||
|
@ -44,7 +42,6 @@ generate = [
|
|||
"Gst.DeviceMonitor",
|
||||
"Gst.StreamType",
|
||||
"Gst.StreamFlags",
|
||||
"Gst.PadLinkReturn",
|
||||
"Gst.ProgressType",
|
||||
"Gst.BusSyncReply",
|
||||
"Gst.TagMergeMode",
|
||||
|
@ -65,7 +62,6 @@ generate = [
|
|||
"Gst.TocLoopType",
|
||||
"Gst.TocSetter",
|
||||
"Gst.ClockType",
|
||||
"Gst.ClockReturn",
|
||||
"Gst.ElementFlags",
|
||||
"Gst.Rank",
|
||||
"Gst.PadLinkCheck",
|
||||
|
@ -705,3 +701,23 @@ status = "generate"
|
|||
pattern = "parse.*full"
|
||||
# wrong mutable for context parameter
|
||||
ignore = true
|
||||
|
||||
[[object]]
|
||||
name = "Gst.StateChangeReturn"
|
||||
status = "generate"
|
||||
must_use = true
|
||||
|
||||
[[object]]
|
||||
name = "Gst.FlowReturn"
|
||||
status = "generate"
|
||||
must_use = true
|
||||
|
||||
[[object]]
|
||||
name = "Gst.PadLinkReturn"
|
||||
status = "generate"
|
||||
must_use = true
|
||||
|
||||
[[object]]
|
||||
name = "Gst.ClockReturn"
|
||||
status = "generate"
|
||||
must_use = true
|
||||
|
|
|
@ -191,6 +191,7 @@ impl SetValue for CapsIntersectMode {
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
#[must_use]
|
||||
pub enum ClockReturn {
|
||||
Ok,
|
||||
Early,
|
||||
|
@ -677,6 +678,7 @@ impl SetValue for EventType {
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
#[must_use]
|
||||
pub enum FlowReturn {
|
||||
CustomSuccess2,
|
||||
CustomSuccess1,
|
||||
|
@ -993,6 +995,7 @@ impl SetValue for PadDirection {
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
#[must_use]
|
||||
pub enum PadLinkReturn {
|
||||
Ok,
|
||||
WrongHierarchy,
|
||||
|
@ -1950,6 +1953,7 @@ impl SetValue for StateChange {
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
#[must_use]
|
||||
pub enum StateChangeReturn {
|
||||
Failure,
|
||||
Success,
|
||||
|
|
Loading…
Reference in a new issue