Commit e8638c16 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Mark various enums that can signal errors as #[must_use]

See https://github.com/sdroege/gstreamer-rs/issues/44
parent 3179806f
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment