Skip to content

Commit 0314514

Browse files
committed
Compare references instead of allocating each time
1 parent d191c24 commit 0314514

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/plot/absolute.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ fn find_artist_dates(entries: &Vec<SongEntry>, art: &Artist) -> Vec<DateTime<Tz>
4040
let mut dates = Vec::<DateTime<Tz>>::new();
4141

4242
for entry in entries {
43-
let artist = Artist::new(entry.artist.clone());
44-
45-
if artist == *art {
43+
if entry.artist.eq(&art.name) {
4644
dates.push(entry.timestamp);
4745
}
4846
}

0 commit comments

Comments
 (0)