diff options
Diffstat (limited to 'src/queue.rs')
| -rw-r--r-- | src/queue.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/queue.rs b/src/queue.rs index da79441..17f2143 100644 --- a/src/queue.rs +++ b/src/queue.rs | |||
| @@ -5,9 +5,9 @@ | |||
| 5 | * https://codeberg.org/salmonik/RSPlayer | 5 | * https://codeberg.org/salmonik/RSPlayer |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | use rand::SeedableRng; | ||
| 8 | use rand::rngs::StdRng; | 9 | use rand::rngs::StdRng; |
| 9 | use rand::seq::SliceRandom; | 10 | use rand::seq::SliceRandom; |
| 10 | use rand::SeedableRng; | ||
| 11 | use std::path::{Path, PathBuf}; | 11 | use std::path::{Path, PathBuf}; |
| 12 | 12 | ||
| 13 | #[derive(Debug, Clone, PartialEq)] | 13 | #[derive(Debug, Clone, PartialEq)] |
| @@ -315,11 +315,11 @@ impl Queue { | |||
| 315 | let mut played: Vec<Track> = Vec::new(); | 315 | let mut played: Vec<Track> = Vec::new(); |
| 316 | let mut played_idx: Vec<usize> = Vec::new(); | 316 | let mut played_idx: Vec<usize> = Vec::new(); |
| 317 | for i in 0..=current_pos { | 317 | for i in 0..=current_pos { |
| 318 | if let Some(&idx) = self.shuffled_indices.get(i) { | 318 | if let Some(&idx) = self.shuffled_indices.get(i) |
| 319 | if let Some(track) = self.tracks.get(idx) { | 319 | && let Some(track) = self.tracks.get(idx) |
| 320 | played.push(track.clone()); | 320 | { |
| 321 | played_idx.push(idx); | 321 | played.push(track.clone()); |
| 322 | } | 322 | played_idx.push(idx); |
| 323 | } | 323 | } |
| 324 | } | 324 | } |
| 325 | 325 | ||
