diff --git a/psst-core/build.rs b/psst-core/build.rs index 22f93f53..e05191da 100644 --- a/psst-core/build.rs +++ b/psst-core/build.rs @@ -30,7 +30,9 @@ fn main() { // And construct the http-style url remote_url = format!("https://{domain}/{path}"); } - remote_url = remote_url.trim_end_matches(".git").to_owned(); + let trimmed_url = remote_url.trim_end_matches(".git"); + remote_url.clone_from(&String::from(trimmed_url)); + let outfile = format!("{}/remote-url.txt", outdir); let mut file = fs::File::create(outfile).unwrap(); write!(file, r#""{}""#, remote_url).ok(); diff --git a/psst-gui/src/data/id.rs b/psst-gui/src/data/id.rs index 2915012e..45e52a85 100644 --- a/psst-gui/src/data/id.rs +++ b/psst-gui/src/data/id.rs @@ -1,3 +1,4 @@ +#[allow(dead_code)] pub trait Id { type Id: PartialEq; diff --git a/psst-gui/src/ui/mod.rs b/psst-gui/src/ui/mod.rs index 80143b7e..8a127133 100644 --- a/psst-gui/src/ui/mod.rs +++ b/psst-gui/src/ui/mod.rs @@ -2,7 +2,6 @@ use std::time::Duration; use druid::{ im::Vector, - lens::Unit, widget::{CrossAxisAlignment, Either, Flex, Label, List, Scroll, Slider, Split, ViewSwitcher}, Color, Env, Insets, Key, LensExt, Menu, MenuItem, Selector, Widget, WidgetExt, WindowDesc, }; diff --git a/psst-gui/src/ui/preferences.rs b/psst-gui/src/ui/preferences.rs index 2175f4f7..fd826f49 100644 --- a/psst-gui/src/ui/preferences.rs +++ b/psst-gui/src/ui/preferences.rs @@ -228,7 +228,6 @@ fn general_tab_widget() -> impl Widget { |usize: &usize| usize.to_string(), )), ) - .padding((theme::grid(1.5), 0.0)) .lens(AppState::config.then(Config::seek_duration)), ); @@ -246,7 +245,6 @@ fn general_tab_widget() -> impl Widget { |usize: &usize| usize.to_string(), )), ) - .padding((theme::grid(1.5), 0.0)) .lens(AppState::config.then(Config::paginated_limit)), ); diff --git a/psst-gui/src/widget/icons.rs b/psst-gui/src/widget/icons.rs index 848908fc..86ce40ec 100644 --- a/psst-gui/src/widget/icons.rs +++ b/psst-gui/src/widget/icons.rs @@ -1,6 +1,7 @@ use crate::ui::theme; use druid::{kurbo::BezPath, widget::prelude::*, Affine, Color, KeyOrValue, Size}; +#[allow(dead_code)] pub static LOGO: SvgIcon = SvgIcon { svg_path: "M2.34146 0.685791L28.5825 26.9268L26.9268 28.5825L0.685791 2.34145L2.34146 0.685791Z M22.2439 11.7073V15.2195C22.2441 15.8464 22.1721 16.4712 22.0295 17.0817L23.9012 18.9512C24.3547 17.7594 24.5865 16.4947 24.5854 15.2195V11.7073H22.2439ZM15.2195 29.2683V25.691C16.6827 25.5282 18.0952 25.0587 19.3646 24.3132L17.6342 22.5841C16.3849 23.1891 15.0025 23.4672 13.6165 23.3925C12.2305 23.3178 10.886 22.8926 9.70906 22.1568C8.53207 21.421 7.56101 20.3986 6.88673 19.1853C6.21245 17.9721 5.85701 16.6076 5.85367 15.2195V11.7073H3.51221V15.2195C3.51221 20.6341 7.61708 25.1063 12.8781 25.691V29.2683H8.19513V31.6098H19.9025V29.2683H15.2195ZM19.9025 14.9539V7.02438C19.9025 3.74194 17.3312 1.17072 14.0488 1.17072C13.029 1.16706 12.0261 1.43096 11.1402 1.93606C10.2542 2.44117 9.5163 3.16981 9.00001 4.04926 M8.19513 13.1437V15.1464C8.19618 16.706 8.81282 18.2022 9.91098 19.3098C10.66 20.0884 11.6134 20.6402 12.6617 20.9017C13.71 21.1633 14.8108 21.1241 15.8378 20.7886L8.19513 13.1437Z", svg_size: Size::new(29.0, 32.0), diff --git a/psst-gui/src/widget/mod.rs b/psst-gui/src/widget/mod.rs index c6407d2f..9c9054b2 100644 --- a/psst-gui/src/widget/mod.rs +++ b/psst-gui/src/widget/mod.rs @@ -35,6 +35,7 @@ use crate::{ }; pub trait MyWidgetExt: Widget + Sized + 'static { + #[allow(dead_code)] fn log(self, label: &'static str) -> Logger { Logger::new(self).with_label(label) } diff --git a/psst-gui/src/widget/remote_image.rs b/psst-gui/src/widget/remote_image.rs index 20e51da0..4a68a215 100644 --- a/psst-gui/src/widget/remote_image.rs +++ b/psst-gui/src/widget/remote_image.rs @@ -58,7 +58,7 @@ impl Widget for RemoteImage { if let LifeCycle::WidgetAdded = event { let location = (self.locator)(data, env); self.image = None; - self.location = location.clone(); + self.location.clone_from(&location); if let Some(location) = location { ctx.submit_command(REQUEST_DATA.with(location).to(ctx.widget_id())); } @@ -74,7 +74,7 @@ impl Widget for RemoteImage { let location = (self.locator)(data, env); if location != self.location { self.image = None; - self.location = location.clone(); + self.location.clone_from(&location); if let Some(location) = location { ctx.submit_command(REQUEST_DATA.with(location).to(ctx.widget_id())); }