From 632d5f4c57b3d354eb9c296c42007ad7f20d2d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 25 Jul 2018 10:07:20 +0300 Subject: [PATCH] Change some empty structs to empty enums These should only really exist at the type-level. --- gstreamer-video/src/video_frame.rs | 5 +++-- gstreamer/src/buffer.rs | 4 ++-- gstreamer/src/tags.rs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gstreamer-video/src/video_frame.rs b/gstreamer-video/src/video_frame.rs index 5adfa28bd..5b902ed6e 100644 --- a/gstreamer-video/src/video_frame.rs +++ b/gstreamer-video/src/video_frame.rs @@ -20,8 +20,9 @@ use std::ops; use std::ptr; use std::slice; -pub struct Readable; -pub struct Writable; +pub enum Readable {} +pub enum Writable {} + pub struct VideoFrame( ffi::GstVideoFrame, Option, diff --git a/gstreamer/src/buffer.rs b/gstreamer/src/buffer.rs index b67442bd9..59a56f802 100644 --- a/gstreamer/src/buffer.rs +++ b/gstreamer/src/buffer.rs @@ -24,8 +24,8 @@ use glib; use glib::translate::{from_glib, from_glib_full, ToGlib}; use glib_ffi; -pub struct Readable; -pub struct Writable; +pub enum Readable {} +pub enum Writable {} #[repr(C)] pub struct BufferRef(ffi::GstBuffer); diff --git a/gstreamer/src/tags.rs b/gstreamer/src/tags.rs index 29072d690..b50852e8a 100644 --- a/gstreamer/src/tags.rs +++ b/gstreamer/src/tags.rs @@ -30,7 +30,7 @@ pub trait Tag<'a> { macro_rules! impl_tag( ($name:ident, $t:ty, $rust_tag:ident, $gst_tag:ident) => { - pub struct $name; + pub enum $name {} impl<'a> Tag<'a> for $name { type TagType = $t; fn tag_name<'b>() -> &'b str {