Skip to content

Commit

Permalink
Resolve linting warnings (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode authored Feb 7, 2024
1 parent 38422b1 commit 210b647
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
4 changes: 2 additions & 2 deletions psst-gui/src/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use druid::{
use psst_core::{item_id::ItemId, session::SessionService};

pub use crate::data::{
album::{Album, AlbumDetail, AlbumLink, AlbumType, Copyright, CopyrightType},
album::{Album, AlbumDetail, AlbumLink, AlbumType},
artist::{Artist, ArtistAlbums, ArtistDetail, ArtistLink, ArtistTracks},
config::{AudioQuality, Authentication, Config, Preferences, PreferencesTab, Theme},
ctx::Ctx,
Expand All @@ -55,7 +55,7 @@ pub use crate::data::{
search::{Search, SearchResults, SearchTopic},
show::{Episode, EpisodeId, EpisodeLink, Show, ShowDetail, ShowEpisodes, ShowLink},
slider_scroll_scale::SliderScrollScale,
track::{AudioAnalysis, AudioSegment, TimeInterval, Track, TrackId},
track::{AudioAnalysis, Track, TrackId},
user::UserProfile,
utils::{Cached, Float64, Image, Page},
};
Expand Down
13 changes: 5 additions & 8 deletions psst-gui/src/webapi/local.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{
collections::HashMap,
convert::TryInto,
fs::File,
io::{self, Cursor, Read},
path::PathBuf,
Expand Down Expand Up @@ -138,13 +137,11 @@ impl LocalTrackManager {
let matching_tracks = self.tracks.get(&local_track.name)?;

for parsed_track in matching_tracks {
let path: PathBuf = match (&*parsed_track.path).try_into() {
Ok(t) => t,
Err(e) => {
log::error!("error loading local file {:?}", e);
continue;
}
};
let path: PathBuf = (&*parsed_track.path).into();
if !path.exists() {
log::error!("error loading local file: Path does not exist");
continue;
}

if Self::is_matching_in_addition_to_title(parsed_track, &local_track) {
return Some(Arc::new(Track {
Expand Down
1 change: 0 additions & 1 deletion psst-gui/src/webapi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ mod client;
mod local;

pub use client::WebApi;
pub use local::LocalTrackManager;
3 changes: 1 addition & 2 deletions psst-gui/src/widget/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ pub use checkbox::Checkbox;
pub use dispatcher::ViewDispatcher;
use druid_shell::Cursor;
pub use empty::Empty;
pub use icons::Icon;
pub use link::Link;
pub use maybe::Maybe;
pub use overlay::{Overlay, OverlayPosition};
pub use overlay::{Overlay};
pub use promise::Async;
pub use remote_image::RemoteImage;
pub use theme::ThemeScope;
Expand Down

0 comments on commit 210b647

Please sign in to comment.