@@ -113,8 +113,8 @@ pub fn parse_sof<R: Read>(reader: &mut R, marker: Marker) -> Result<FrameInfo> {
113
113
114
114
let is_baseline = marker == SOF ( 0 ) ;
115
115
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 ,
118
118
_ => panic ! ( ) ,
119
119
} ;
120
120
let coding_process = match marker {
@@ -124,8 +124,8 @@ pub fn parse_sof<R: Read>(reader: &mut R, marker: Marker) -> Result<FrameInfo> {
124
124
_ => panic ! ( ) ,
125
125
} ;
126
126
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 ,
129
129
_ => panic ! ( ) ,
130
130
} ;
131
131
@@ -296,8 +296,8 @@ pub fn parse_sos<R: Read>(reader: &mut R, frame: &FrameInfo) -> Result<ScanInfo>
296
296
return Err ( Error :: Format ( "scan with more than one component and more than 10 blocks per MCU" . to_owned ( ) ) ) ;
297
297
}
298
298
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 ( ) ? ;
301
301
302
302
let byte = reader. read_u8 ( ) ?;
303
303
let successive_approximation_high = byte >> 4 ;
0 commit comments