@@ -163,7 +163,6 @@ pub enum JsonBinaryEncoding {
163163
164164#[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash , PartialOrd , Ord ) ]
165165pub enum Channel {
166- RealTime ,
167166 FixedRate ( FixedRate ) ,
168167}
169168
@@ -173,7 +172,6 @@ impl Serialize for Channel {
173172 S : serde:: Serializer ,
174173 {
175174 match self {
176- Channel :: RealTime => serializer. serialize_str ( "real_time" ) ,
177175 Channel :: FixedRate ( fixed_rate) => {
178176 serializer. serialize_str ( & format ! ( "fixed_rate@{}ms" , fixed_rate. value_ms( ) ) )
179177 }
@@ -184,7 +182,6 @@ impl Serialize for Channel {
184182mod channel_ids {
185183 use super :: ChannelId ;
186184
187- pub const REAL_TIME : ChannelId = ChannelId ( 1 ) ;
188185 pub const FIXED_RATE_50 : ChannelId = ChannelId ( 2 ) ;
189186 pub const FIXED_RATE_200 : ChannelId = ChannelId ( 3 ) ;
190187 pub const FIXED_RATE_1 : ChannelId = ChannelId ( 4 ) ;
@@ -193,7 +190,6 @@ mod channel_ids {
193190impl Channel {
194191 pub fn id ( & self ) -> ChannelId {
195192 match self {
196- Channel :: RealTime => channel_ids:: REAL_TIME ,
197193 Channel :: FixedRate ( fixed_rate) => match fixed_rate. value_ms ( ) {
198194 1 => channel_ids:: FIXED_RATE_1 ,
199195 50 => channel_ids:: FIXED_RATE_50 ,
@@ -212,9 +208,7 @@ fn id_supports_all_fixed_rates() {
212208}
213209
214210fn parse_channel ( value : & str ) -> Option < Channel > {
215- if value == "real_time" {
216- Some ( Channel :: RealTime )
217- } else if let Some ( rest) = value. strip_prefix ( "fixed_rate@" ) {
211+ if let Some ( rest) = value. strip_prefix ( "fixed_rate@" ) {
218212 let ms_value = rest. strip_suffix ( "ms" ) ?;
219213 Some ( Channel :: FixedRate ( FixedRate :: from_ms (
220214 ms_value. parse ( ) . ok ( ) ?,
0 commit comments