Skip to content

Commit 341ffce

Browse files
Run cargo fmt on wakeword tests
1 parent 5ffb63c commit 341ffce

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

livekit-wakeword/tests/common/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ pub fn read_wav(name: &str) -> (u32, Vec<i16>) {
3131

3232
// Down-mix to mono by taking every Nth sample (first channel)
3333
let samples = if spec.channels > 1 {
34-
all_samples
35-
.chunks(spec.channels as usize)
36-
.map(|chunk| chunk[0])
37-
.collect()
34+
all_samples.chunks(spec.channels as usize).map(|chunk| chunk[0]).collect()
3835
} else {
3936
all_samples
4037
};
@@ -43,7 +40,5 @@ pub fn read_wav(name: &str) -> (u32, Vec<i16>) {
4340
}
4441

4542
fn fixtures_dir() -> PathBuf {
46-
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
47-
.join("tests")
48-
.join("fixtures")
43+
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests").join("fixtures")
4944
}

livekit-wakeword/tests/integration.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ use livekit_wakeword::{WakeWordModel, SAMPLE_RATE};
1919
mod common;
2020

2121
fn fixtures_dir() -> PathBuf {
22-
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
23-
.join("tests")
24-
.join("fixtures")
22+
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests").join("fixtures")
2523
}
2624

2725
fn classifier_path() -> PathBuf {

0 commit comments

Comments
 (0)