From 7ea09dde3c49fc462206eccc5e0389d6b78de5da Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Tue, 26 Apr 2022 14:53:33 -0700 Subject: [PATCH] make item enums non_exhaustive --- CHANGELOG.md | 2 ++ src/client/mod.rs | 1 + src/codec/mod.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f46f91..28c3762 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ `retina::PacketContext`. Both must be printed to provide the same information as before. This change reduces how much data needs to be copied with each packet. +* BREAKING: `PacketItem` and `CodecItem` are now `#[non_exhaustive]` for + future expansion. ## `v0.3.9` (2022-04-12) diff --git a/src/client/mod.rs b/src/client/mod.rs index a05af78..f67e645 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -1796,6 +1796,7 @@ async fn punch_firewall_hole( /// An item yielded by [`Session`]'s [`futures::stream::Stream`] impl. #[derive(Debug)] +#[non_exhaustive] pub enum PacketItem { RtpPacket(rtp::Packet), SenderReport(rtp::SenderReport), diff --git a/src/codec/mod.rs b/src/codec/mod.rs index c56b80f..d969d95 100644 --- a/src/codec/mod.rs +++ b/src/codec/mod.rs @@ -26,6 +26,7 @@ pub(crate) mod simple_audio; /// An item yielded from [`crate::client::Demuxed`]'s [`futures::stream::Stream`] impl. #[derive(Debug)] +#[non_exhaustive] pub enum CodecItem { VideoFrame(VideoFrame), AudioFrame(AudioFrame),