@@ -113,8 +113,8 @@ pub fn parse_sof<R: Read>(reader: &mut R, marker: Marker) -> Result<FrameInfo> {
113113
114114 let is_baseline = marker == SOF ( 0 ) ;
115115 let is_differential = match marker {
116- SOF ( 0 ... 3 ) | SOF ( 9 ... 11 ) => false ,
117- SOF ( 5 ... 7 ) | SOF ( 13 ... 15 ) => true ,
116+ SOF ( 0 ..= 3 ) | SOF ( 9 ..= 11 ) => false ,
117+ SOF ( 5 ..= 7 ) | SOF ( 13 ..= 15 ) => true ,
118118 _ => panic ! ( ) ,
119119 } ;
120120 let coding_process = match marker {
@@ -124,8 +124,8 @@ pub fn parse_sof<R: Read>(reader: &mut R, marker: Marker) -> Result<FrameInfo> {
124124 _ => panic ! ( ) ,
125125 } ;
126126 let entropy_coding = match marker {
127- SOF ( 0 ... 3 ) | SOF ( 5 ... 7 ) => EntropyCoding :: Huffman ,
128- SOF ( 9 ... 11 ) | SOF ( 13 ... 15 ) => EntropyCoding :: Arithmetic ,
127+ SOF ( 0 ..= 3 ) | SOF ( 5 ..= 7 ) => EntropyCoding :: Huffman ,
128+ SOF ( 9 ..= 11 ) | SOF ( 13 ..= 15 ) => EntropyCoding :: Arithmetic ,
129129 _ => panic ! ( ) ,
130130 } ;
131131
@@ -296,8 +296,8 @@ pub fn parse_sos<R: Read>(reader: &mut R, frame: &FrameInfo) -> Result<ScanInfo>
296296 return Err ( Error :: Format ( "scan with more than one component and more than 10 blocks per MCU" . to_owned ( ) ) ) ;
297297 }
298298
299- let spectral_selection_start = try! ( reader. read_u8 ( ) ) ;
300- let spectral_selection_end = try! ( reader. read_u8 ( ) ) ;
299+ let spectral_selection_start = reader. read_u8 ( ) ? ;
300+ let spectral_selection_end = reader. read_u8 ( ) ? ;
301301
302302 let byte = reader. read_u8 ( ) ?;
303303 let successive_approximation_high = byte >> 4 ;
0 commit comments