Skip to content

Commit 1ec4393

Browse files
committed
fix: replace unnecessary clone with std::slice::from_ref
Replace track.clone() with std::slice::from_ref(track) to avoid unnecessary allocation as suggested by newer clippy versions
1 parent d245633 commit 1ec4393

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/scrubber.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ impl<S: StateStorage, P: ScrubActionProvider> ScrobbleScrubber<S, P> {
638638
);
639639

640640
// Analyze this single track
641-
let track_slice = &[track.clone()];
641+
let track_slice = std::slice::from_ref(track);
642642
let track_suggestions = self.analyze_tracks(track_slice).await;
643643
let run_id = Uuid::new_v4().to_string();
644644

0 commit comments

Comments
 (0)