Skip to content

Commit

Permalink
Compare references instead of allocating each time
Browse files Browse the repository at this point in the history
  • Loading branch information
fsktom committed Mar 29, 2023
1 parent d191c24 commit 0314514
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/plot/absolute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ fn find_artist_dates(entries: &Vec<SongEntry>, art: &Artist) -> Vec<DateTime<Tz>
let mut dates = Vec::<DateTime<Tz>>::new();

for entry in entries {
let artist = Artist::new(entry.artist.clone());

if artist == *art {
if entry.artist.eq(&art.name) {
dates.push(entry.timestamp);
}
}
Expand Down

0 comments on commit 0314514

Please sign in to comment.