Skip to content

Commit 4c40943

Browse files
committed
clippy
1 parent a40cbfb commit 4c40943

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ unused_must_use = "deny"
8383
[workspace.lints.clippy]
8484
dbg_macro = "deny"
8585
let_underscore_future = "deny"
86-
unchecked_time_subtraction = "deny"
86+
unchecked_duration_subtraction = "deny"
8787
collapsible_if = "deny"
8888
clone_on_copy = "deny"
8989
redundant_closure = "deny"

crates/audio/src/latency.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ mod windows {
945945
}
946946

947947
#[cfg(test)]
948-
#[allow(clippy::unchecked_time_subtraction)]
948+
#[allow(clippy::unchecked_duration_subtraction)]
949949
mod tests {
950950
use super::*;
951951
use std::time::Instant;

crates/editor/examples/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::path::PathBuf;
66
async fn main() {
77
let path: PathBuf = std::env::args().collect::<Vec<_>>().swap_remove(1).into();
88

9-
let editor = EditorInstance::new(path, |_s| {}, Box::new(|_| {}))
9+
let editor = EditorInstance::new(path, |_s| {}, Box::new(|_| {}), None)
1010
.await
1111
.unwrap();
1212

crates/export/src/mp4.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,11 +559,11 @@ mod tests {
559559
let uv_size = (width * height / 2) as usize;
560560

561561
let mut nv12_data = vec![0u8; y_size + uv_size];
562-
for i in 0..y_size {
563-
nv12_data[i] = (i % 256) as u8;
562+
for (i, item) in nv12_data.iter_mut().take(y_size).enumerate() {
563+
*item = (i % 256) as u8;
564564
}
565-
for i in 0..uv_size {
566-
nv12_data[y_size + i] = (128 + i % 128) as u8;
565+
for (i, item) in nv12_data.iter_mut().skip(y_size).take(uv_size).enumerate() {
566+
*item = (128 + i % 128) as u8;
567567
}
568568

569569
let input = Nv12ExportFrame {

0 commit comments

Comments
 (0)