Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gilcu3 committed Jul 23, 2024
1 parent ee63d25 commit 07bfdf6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
15 changes: 8 additions & 7 deletions src/main_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,15 @@ impl MainController {
Message::Dl(DownloadMsg::Complete(ep_data)) => {
self.download_complete(ep_data);
}
Message::Dl(DownloadMsg::ResponseError(_)) => {
self.notif_to_ui("Error sending download request.".to_string(), true)
}
Message::Dl(DownloadMsg::FileCreateError(_)) => {
self.notif_to_ui("Error creating file.".to_string(), true)
Message::Dl(DownloadMsg::ResponseError(ep)) => self.notif_to_ui(
"Error sending download request. ".to_string() + &ep.url,
true,
),
Message::Dl(DownloadMsg::FileCreateError(ep)) => {
self.notif_to_ui("Error creating file. ".to_string() + &ep.title, true)
}
Message::Dl(DownloadMsg::FileWriteError(_)) => {
self.notif_to_ui("Error downloading episode.".to_string(), true)
Message::Dl(DownloadMsg::FileWriteError(ep)) => {
self.notif_to_ui("Error downloading episode. ".to_string() + &ep.title, true)
}

Message::Ui(UiMsg::Delete(pod_id, ep_id)) => {
Expand Down
1 change: 1 addition & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub struct Podcast {
pub url: String,
pub description: Option<String>,
pub author: Option<String>,
#[allow(dead_code)]
pub explicit: Option<bool>,
pub last_checked: DateTime<Utc>,
pub episodes: LockVec<Episode>,
Expand Down
4 changes: 1 addition & 3 deletions src/ui/details_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ pub struct DetailsPanel {
pub panel: Panel,
pub details: Option<Details>,
pub content: Vec<DetailsLine>,
pub top_row: u16, // top row of text shown in window
pub total_rows: u16, // the total number of rows the details take up
pub top_row: u16, // top row of text shown in window
}

impl DetailsPanel {
Expand All @@ -51,7 +50,6 @@ impl DetailsPanel {
details: None,
content: Vec::new(),
top_row: 0,
total_rows: 0,
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/ui/mock_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ use super::AppColors;
#[derive(Debug)]
pub struct Panel {
pub buffer: Vec<String>,
#[allow(dead_code)]
pub screen_pos: usize,
pub colors: Rc<AppColors>,
#[allow(dead_code)]
pub title: String,
pub start_x: u16,
pub n_row: u16,
Expand Down

0 comments on commit 07bfdf6

Please sign in to comment.