generated from GarandPLG/rust-flake-template
Add rustfmt configuration and reformat code
- Document new Rust formatting standards in AGENTS, CODE_MAP, and PROGRESS. - Add rustfmt.toml with style 2024, 2‑space indents, 100‑char width, LF endings. - Apply consistent 2‑space indentation and ordering across source files. - Minor clean‑up of imports and whitespace to match the new style.
This commit is contained in:
1 parent
9e09aaf75e
commit
c4313b4117
60 files changed
+3632
-3610
No files matched your search
+10
-10
@@ -1,19 +1,19 @@
|
||||
use rodio::Decoder;
|
||||
use std::{
|
||||
fs::read,
|
||||
io::{BufReader, Cursor},
|
||||
fs::read,
|
||||
io::{BufReader, Cursor},
|
||||
};
|
||||
use war_in_tunnels::app::threads::{SoundrackParts, Soundtrack, load_audio};
|
||||
|
||||
#[test]
|
||||
fn audio_repeats_after_end_of_file() {
|
||||
let data = read("soundtracks/default/calm.ogg").unwrap();
|
||||
let sample_count = Decoder::new(BufReader::new(Cursor::new(data)))
|
||||
.unwrap()
|
||||
.count();
|
||||
assert!(sample_count > 0);
|
||||
let data = read("soundtracks/default/calm.ogg").unwrap();
|
||||
let sample_count = Decoder::new(BufReader::new(Cursor::new(data)))
|
||||
.unwrap()
|
||||
.count();
|
||||
assert!(sample_count > 0);
|
||||
|
||||
let mut source = load_audio(&Soundtrack::Default, &SoundrackParts::Calm);
|
||||
assert_eq!(source.by_ref().take(sample_count).count(), sample_count);
|
||||
assert_eq!(source.take(1024).count(), 1024);
|
||||
let mut source = load_audio(&Soundtrack::Default, &SoundrackParts::Calm);
|
||||
assert_eq!(source.by_ref().take(sample_count).count(), sample_count);
|
||||
assert_eq!(source.take(1024).count(), 1024);
|
||||
}
|
||||
Reference in new issue
Block a user