Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Oldham committed Aug 7, 2024
1 parent 5137a34 commit 13d4567
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion psst-gui/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn add_windows_icon() {
res.compile().expect("Could not attach exe icon");

fn load_images() -> Vec<IcoFrame<'static>> {
let sizes = vec![32, 64, 128, 256];
let sizes = [32, 64, 128, 256];
sizes
.iter()
.map(|s| {
Expand Down
8 changes: 3 additions & 5 deletions psst-gui/src/controller/playback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use souvlaki::{

use crate::{
cmd,
data::{AppState, Config, NowPlaying, Playback, PlaybackOrigin, PlaybackState, QueueBehavior, QueueEntry},
data::{AppState, Config, Playback, PlaybackOrigin, PlaybackState, QueueBehavior, QueueEntry},
};

pub struct PlaybackController {
Expand Down Expand Up @@ -356,10 +356,8 @@ where
}
Event::Command(cmd) if cmd.is(cmd::PLAYBACK_PLAYING) => {
let (item, progress) = cmd.get_unchecked(cmd::PLAYBACK_PLAYING);
if data.added_queue.len() > 0 {
if data.playback.now_playing.as_mut().is_some_and(|np| np.item.id() == data.added_queue[0].item.id()) {
data.added_queue.remove(0);
}
if !data.added_queue.is_empty() && data.playback.now_playing.as_mut().is_some_and(|np| np.item.id() == data.added_queue[0].item.id()) {
data.added_queue.remove(0);
}
if let Some(queued) = data.queued_entry(*item) {
data.start_playback(queued.item, queued.origin, progress.to_owned());
Expand Down
2 changes: 1 addition & 1 deletion psst-gui/src/ui/track.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::sync::Arc;

use druid::{
widget::{CrossAxisAlignment, Either, Flex, Label, LineBreaking, ViewSwitcher},
widget::{CrossAxisAlignment, Either, Flex, Label, ViewSwitcher},
LensExt, LocalizedString, Menu, MenuItem, Size, TextAlignment, Widget, WidgetExt,
};
use psst_core::{
Expand Down

0 comments on commit 13d4567

Please sign in to comment.