mirror of
https://github.com/storytold/soundcraft.git
synced 2026-10-24 02:26:46 -06:00
Merge pull request #779 from storytold/fix/fmt-clip-group-test
Fix main: rustfmt the clip group overlap test
This commit is contained in:
@@ -258,7 +258,8 @@ mod tests {
|
||||
let r = e.execute("file.import_clip_groups", &json!({"path": p.to_string_lossy()})).unwrap();
|
||||
let ids: Vec<_> = r["clips"].as_array().unwrap().iter().filter_map(serde_json::Value::as_u64).collect();
|
||||
assert_eq!(ids.len(), 2);
|
||||
let spans: Vec<_> = ids.iter().filter_map(|id| e.session().find_clip(soundcraft_model::ClipId(*id)).map(|(_, c)| (c.start, c.length))).collect();
|
||||
let spans: Vec<_> =
|
||||
ids.iter().filter_map(|id| e.session().find_clip(soundcraft_model::ClipId(*id)).map(|(_, c)| (c.start, c.length))).collect();
|
||||
// The group lands at the insertion point; its clips keep their relative positions and overlap.
|
||||
let at = spans.first().map_or(0, |s| s.0);
|
||||
assert_eq!(spans, vec![(at, 1000), (at + 600, 1000)]);
|
||||
|
||||
Reference in New Issue
Block a user