Skip to content

Commit

Permalink
Linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Jan 29, 2025
1 parent 2e18144 commit c918952
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion psst-gui/src/controller/playback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl PlaybackController {
album: album.as_deref(),
artist: artist.as_deref(),
duration,
cover_url: cover_url.as_deref(),
cover_url: cover_url,
})
.unwrap();
}
Expand Down
2 changes: 1 addition & 1 deletion psst-gui/src/ui/track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ pub fn playable_widget(track: &Track, display: Display) -> impl Widget<PlayRow<A
return *target_id == row.item.id;
}
// Otherwise check if it's playing or is the current track
row.is_playing || row.ctx.now_playing.as_ref().map_or(false, |playable| {
row.is_playing || row.ctx.now_playing.as_ref().is_some_and(|playable| {
matches!(playable, Playable::Track(track) if track.id == row.item.id)
})
})
Expand Down
4 changes: 2 additions & 2 deletions psst-gui/src/webapi/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ impl LocalTrackManager {
.artists
.iter()
.next()
.map_or(false, |t2_artist| t2_artist.name != t1.artist);
.is_some_and(|t2_artist| t2_artist.name != t1.artist);
let album_mismatch = t2
.album
.as_ref()
.map_or(false, |t2_album| t2_album.name != t1.album);
.is_some_and(|t2_album| t2_album.name != t1.album);
!(artist_mismatch || album_mismatch)
}
}
Expand Down
2 changes: 1 addition & 1 deletion psst-gui/src/widget/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl<T: Data> Widget<T> for Link<T> {
let is_active = self
.is_active
.as_ref()
.map_or(false, |predicate| predicate(data, env));
.is_some_and(|predicate| predicate(data, env));
if is_active {
env.get(theme::LINK_ACTIVE_COLOR)
} else {
Expand Down

0 comments on commit c918952

Please sign in to comment.