From 32038ccad059e6634cd75aa7a06019d7224985f7 Mon Sep 17 00:00:00 2001 From: Eric Rahm Date: Wed, 10 Jul 2019 23:03:31 +0000 Subject: [PATCH] Bug 1564647 - Fix sdp `...` range patterns are deprecated errors. r!drno r=drno,ng Differential Revision: https://phabricator.services.mozilla.com/D37510 --HG-- extra : moz-landing-system : lando --- .../signaling/src/sdp/rsdparsa/src/attribute_type.rs | 8 ++++---- media/webrtc/signaling/src/sdp/rsdparsa/src/media_type.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/media/webrtc/signaling/src/sdp/rsdparsa/src/attribute_type.rs b/media/webrtc/signaling/src/sdp/rsdparsa/src/attribute_type.rs index f0001bd0b75d..8e0834b22de2 100644 --- a/media/webrtc/signaling/src/sdp/rsdparsa/src/attribute_type.rs +++ b/media/webrtc/signaling/src/sdp/rsdparsa/src/attribute_type.rs @@ -1817,7 +1817,7 @@ fn parse_fmtp(to_parse: &str) -> Result { // H264 "PROFILE-LEVEL-ID" => { parameters.profile_level_id = match u32::from_str_radix(parameter_val, 16)? { - x @ 0...0x00ff_ffff => x, + x @ 0..=0x00ff_ffff => x, _ => return Err(SdpParserInternalError::Generic( "The fmtp parameter 'profile-level-id' must be in range [0,0xffffff]" .to_string(), @@ -1826,7 +1826,7 @@ fn parse_fmtp(to_parse: &str) -> Result { } "PACKETIZATION-MODE" => { parameters.packetization_mode = match parameter_val.parse::()? { - x @ 0...2 => x, + x @ 0..=2 => x, _ => { return Err(SdpParserInternalError::Generic( "The fmtp parameter 'packetization-mode' must be 0,1 or 2" @@ -1864,7 +1864,7 @@ fn parse_fmtp(to_parse: &str) -> Result { for encoding in encodings { match encoding.parse::()? { - x @ 0...128 => parameters.encodings.push(x), + x @ 0..=128 => parameters.encodings.push(x), _ => { return Err(SdpParserInternalError::Generic( "Red codec must be in range [0,128]".to_string(), @@ -1881,7 +1881,7 @@ fn parse_fmtp(to_parse: &str) -> Result { let validate_digits = |digit_option: Option| -> Option { match digit_option { Some(x) => match x { - 0...100 => Some(x), + 0..=100 => Some(x), _ => None, }, None => None, diff --git a/media/webrtc/signaling/src/sdp/rsdparsa/src/media_type.rs b/media/webrtc/signaling/src/sdp/rsdparsa/src/media_type.rs index 946543ba2fc2..3111b1f883dd 100644 --- a/media/webrtc/signaling/src/sdp/rsdparsa/src/media_type.rs +++ b/media/webrtc/signaling/src/sdp/rsdparsa/src/media_type.rs @@ -371,7 +371,7 @@ pub fn parse_media(value: &str) -> Result { 8 | // PCMA 9 | // G722 13 | // Comfort Noise - 96 ... 127 => (), // dynamic range + 96 ..= 127 => (), // dynamic range _ => return Err(SdpParserInternalError::Generic( "format number in media line is out of range".to_string())) };