File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -175,10 +175,7 @@ fn seek_does_not_break_channel_order(
175
175
}
176
176
}
177
177
178
- fn second_channel_beep_range < R : rodio:: Source > ( source : & mut R ) -> std:: ops:: Range < usize >
179
- where
180
- R : Iterator < Item = f32 > ,
181
- {
178
+ fn second_channel_beep_range < R : rodio:: Source > ( source : & mut R ) -> std:: ops:: Range < usize > {
182
179
let channels = source. channels ( ) as usize ;
183
180
let samples: Vec < f32 > = source. by_ref ( ) . collect ( ) ;
184
181
Original file line number Diff line number Diff line change @@ -72,9 +72,7 @@ fn decoder_returns_total_duration(
72
72
let decoder = get_music ( format) ;
73
73
let res = decoder
74
74
. total_duration ( )
75
- . expect ( & format ! (
76
- "did not return a total duration, decoder: {decoder_name}"
77
- ) )
75
+ . unwrap_or_else ( || panic ! ( "did not return a total duration, decoder: {decoder_name}" ) )
78
76
. as_secs_f64 ( ) ;
79
77
let correct_duration = correct_duration. as_secs_f64 ( ) ;
80
78
let abs_diff = ( res - correct_duration) . abs ( ) ;
You can’t perform that action at this time.
0 commit comments