Skip to content

Commit a44983d

Browse files
committed
Remove ID field from Song struct temporarily
Because if I want to search for an aspect (currently implementing print_aspect) and that aspect is Song, I'd have to know the ID of that song beforehand...
1 parent 14fcd7a commit a44983d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/display.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn gather_songs(entries: &Vec<SongEntry>) -> HashMap<Song, u32> {
8989
let song = Song {
9090
name: entry.track.clone(),
9191
album: album.clone(),
92-
id: entry.id.clone(),
92+
// id: entry.id.clone(),
9393
};
9494

9595
// either create new field with value 0 (and add 1 to it)
@@ -118,7 +118,7 @@ fn gather_songs_with_artist(entries: &Vec<SongEntry>, art: &Artist) -> HashMap<S
118118
let song = Song {
119119
name: entry.track.clone(),
120120
album: album.clone(),
121-
id: entry.id.clone(),
121+
// id: entry.id.clone(),
122122
};
123123

124124
*songs.entry(song).or_insert(0) += 1;
@@ -144,7 +144,7 @@ fn gather_songs_with_album(entries: &Vec<SongEntry>, alb: &Album) -> HashMap<Son
144144
let song = Song {
145145
name: entry.track.clone(),
146146
album: album.clone(),
147-
id: entry.id.clone(),
147+
// id: entry.id.clone(),
148148
};
149149

150150
*songs.entry(song).or_insert(0) += 1;

src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Music for Album {}
4949
pub struct Song {
5050
pub name: String,
5151
pub album: Album,
52-
pub id: String,
52+
// pub id: String,
5353
}
5454

5555
impl Display for Song {

0 commit comments

Comments
 (0)