File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
lazer/sdk/rust/protocol/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -182,9 +182,9 @@ impl Serialize for Channel {
182182mod channel_ids {
183183 use super :: ChannelId ;
184184
185+ pub const FIXED_RATE_1 : ChannelId = ChannelId ( 1 ) ;
185186 pub const FIXED_RATE_50 : ChannelId = ChannelId ( 2 ) ;
186187 pub const FIXED_RATE_200 : ChannelId = ChannelId ( 3 ) ;
187- pub const FIXED_RATE_1 : ChannelId = ChannelId ( 4 ) ;
188188}
189189
190190impl Channel {
@@ -208,7 +208,9 @@ fn id_supports_all_fixed_rates() {
208208}
209209
210210fn parse_channel ( value : & str ) -> Option < Channel > {
211- if let Some ( rest) = value. strip_prefix ( "fixed_rate@" ) {
211+ if value == "real_time" {
212+ Some ( Channel :: FixedRate ( FixedRate :: MIN ) )
213+ } else if let Some ( rest) = value. strip_prefix ( "fixed_rate@" ) {
212214 let ms_value = rest. strip_suffix ( "ms" ) ?;
213215 Some ( Channel :: FixedRate ( FixedRate :: from_ms (
214216 ms_value. parse ( ) . ok ( ) ?,
You can’t perform that action at this time.
0 commit comments