gstreamer: Use #[non_exhaustive] annotation instead of a dummy enum variant

This commit is contained in:
Sebastian Dröge 2021-10-17 12:50:14 +03:00
parent aab0a45cfc
commit d01ed466d0
3 changed files with 3 additions and 3 deletions

View file

@ -286,6 +286,7 @@ pub trait StickyEventType {
}
#[derive(Debug)]
#[non_exhaustive]
pub enum EventView<T> {
FlushStart(FlushStart<T>),
FlushStop(FlushStop<T>),
@ -319,7 +320,6 @@ pub enum EventView<T> {
CustomBoth(CustomBoth<T>),
CustomBothOob(CustomBothOob<T>),
Other(Other<T>),
__NonExhaustive,
}
macro_rules! declare_concrete_event {

View file

@ -168,6 +168,7 @@ impl fmt::Debug for MessageRef {
}
#[derive(Debug)]
#[non_exhaustive]
pub enum MessageView<'a> {
Eos(Eos<'a>),
Error(Error<'a>),
@ -208,7 +209,6 @@ pub enum MessageView<'a> {
Redirect(Redirect<'a>),
DeviceChanged(DeviceChanged<'a>),
Other,
__NonExhaustive,
}
macro_rules! declare_concrete_message(

View file

@ -138,6 +138,7 @@ unsafe impl<'a> AsMutPtr for &'a mut QueryRef {
}
#[derive(Debug)]
#[non_exhaustive]
pub enum QueryView<T> {
Position(Position<T>),
Duration(Duration<T>),
@ -157,7 +158,6 @@ pub enum QueryView<T> {
Context(Context<T>),
Bitrate(Bitrate<T>),
Other(Other<T>),
__NonExhaustive,
}
macro_rules! declare_concrete_query(