diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-02 13:02:11 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-02 13:02:11 +0100 |
| commit | 7683b319b851df5e66465db4916e239b788c09fa (patch) | |
| tree | 204cd95bf68c4707e5c0ad1d62471a35eadad2d3 /tests | |
| parent | install.sh: only install the systemd service on linux (diff) | |
| download | rsplayer-7683b319b851df5e66465db4916e239b788c09fa.tar.gz rsplayer-7683b319b851df5e66465db4916e239b788c09fa.zip | |
queue: use let chains and tidy imports
Diffstat (limited to '')
| -rw-r--r-- | tests/queue.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/queue.rs b/tests/queue.rs index 67cbabf..7472195 100644 --- a/tests/queue.rs +++ b/tests/queue.rs | |||
| @@ -504,7 +504,9 @@ fn test_add_during_shuffle_survives_shuffle_off() { | |||
| 504 | q.len() | 504 | q.len() |
| 505 | ); | 505 | ); |
| 506 | assert!( | 506 | assert!( |
| 507 | q.tracks().iter().any(|t| t.path == PathBuf::from("/music/d.mp3")), | 507 | q.tracks() |
| 508 | .iter() | ||
| 509 | .any(|t| t.path == PathBuf::from("/music/d.mp3")), | ||
| 508 | "track added during shuffle was dropped when shuffle was turned off" | 510 | "track added during shuffle was dropped when shuffle was turned off" |
| 509 | ); | 511 | ); |
| 510 | } | 512 | } |
| @@ -601,7 +603,8 @@ fn test_shuffle_play_now_current_is_inserted_track() { | |||
| 601 | assert_eq!(q.position(), 1); | 603 | assert_eq!(q.position(), 1); |
| 602 | let cur = q.current().expect("queue is not empty"); | 604 | let cur = q.current().expect("queue is not empty"); |
| 603 | assert_eq!( | 605 | assert_eq!( |
| 604 | cur.path, inserted, | 606 | cur.path, |
| 607 | inserted, | ||
| 605 | "seed {}: current() after play-now is {:?}, expected {:?}; shuffled_indices={:?}", | 608 | "seed {}: current() after play-now is {:?}, expected {:?}; shuffled_indices={:?}", |
| 606 | seed, | 609 | seed, |
| 607 | cur.path, | 610 | cur.path, |
