Chore: Fix new(er) Clippy lints
This commit is contained in:
@@ -33,7 +33,7 @@ where
|
||||
config.length_hint = Some(match hint.into() {
|
||||
LengthHint::Bytes(a) => a,
|
||||
LengthHint::Time(t) => {
|
||||
let s = t.as_secs() + if t.subsec_millis() > 0 { 1 } else { 0 };
|
||||
let s = t.as_secs() + u64::from(t.subsec_millis() > 0);
|
||||
(s as usize) * cost_per_sec
|
||||
},
|
||||
});
|
||||
|
||||
@@ -386,7 +386,7 @@ where
|
||||
let to_write = remaining.min(interleaved_space);
|
||||
let need_spill = non_contiguous_end && to_write < remaining;
|
||||
|
||||
let samples_used = to_write + if need_spill { 1 } else { 0 };
|
||||
let samples_used = to_write + usize::from(need_spill);
|
||||
let last_sample = source_pos.start + to_write;
|
||||
|
||||
if need_spill {
|
||||
@@ -430,7 +430,7 @@ fn write_resample_buffer(
|
||||
let to_write = remaining.min(interleaved_space);
|
||||
let need_spill = non_contiguous_end && to_write < remaining;
|
||||
|
||||
let samples_used = to_write + if need_spill { 1 } else { 0 };
|
||||
let samples_used = to_write + usize::from(need_spill);
|
||||
let last_sample = source_pos.start + to_write;
|
||||
|
||||
if need_spill {
|
||||
|
||||
@@ -69,7 +69,7 @@ impl<P: AsRef<Path> + Send + Sync> Compose for File<P> {
|
||||
];
|
||||
|
||||
let mut output = Command::new("ffprobe")
|
||||
.args(&args)
|
||||
.args(args)
|
||||
.output()
|
||||
.await
|
||||
.map_err(|e| AudioStreamError::Fail(Box::new(e)))?;
|
||||
|
||||
@@ -60,7 +60,7 @@ impl YoutubeDl {
|
||||
let ytdl_args = ["-j", &self.url, "-f", "ba[abr>0][vcodec=none]/best"];
|
||||
|
||||
let mut output = Command::new(self.program)
|
||||
.args(&ytdl_args)
|
||||
.args(ytdl_args)
|
||||
.output()
|
||||
.await
|
||||
.map_err(|e| AudioStreamError::Fail(Box::new(e)))?;
|
||||
|
||||
Reference in New Issue
Block a user