Skip to content

Commit 76bfa36

Browse files
committed
refactor: clippy lints
1 parent 5f78dca commit 76bfa36

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

tests/seek.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,7 @@ fn seek_does_not_break_channel_order(
175175
}
176176
}
177177

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> {
182179
let channels = source.channels() as usize;
183180
let samples: Vec<f32> = source.by_ref().collect();
184181

tests/total_duration.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ fn decoder_returns_total_duration(
7272
let decoder = get_music(format);
7373
let res = decoder
7474
.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}"))
7876
.as_secs_f64();
7977
let correct_duration = correct_duration.as_secs_f64();
8078
let abs_diff = (res - correct_duration).abs();

0 commit comments

Comments
 (0)