Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
fix clippy warnings with the latest clippy
  • Loading branch information
lovasoa committed Mar 12, 2023
1 parent 34bcbf0 commit 17ecc72
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/auto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub fn all_dezoomers(include_generic: bool) -> Vec<Box<dyn Dezoomer>> {
}
dezoomers
}

pub struct AutoDezoomer {
dezoomers: Vec<Box<dyn Dezoomer>>,
errors: Vec<(&'static str, DezoomerError)>,
Expand Down
2 changes: 1 addition & 1 deletion src/google_arts_and_culture/tile_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl FromStr for PageInfo {
let name = Regex::new(r#""name":"([^"]+)"#)
.unwrap()
.captures(s)
.map(|c| (c[1]).to_string())
.map(|c| c[1].to_string())
.unwrap_or_else(|| "Google Arts and culture image".into());

Ok(PageInfo {
Expand Down
2 changes: 1 addition & 1 deletion src/output_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn get_outname(
let mut path = base_dir.to_path_buf();
let mut base_with_ext = OsString::from(&base);
base_with_ext.push(".");
base_with_ext.push(&extension);
base_with_ext.push(extension);
path = path.join(base_with_ext);

// append a suffix (_1,_2,..) to `outname` if the file already exists
Expand Down
4 changes: 2 additions & 2 deletions src/pff/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ mod image_properties;

/// Dezoomer for Zoomify PFF.
/// Takes an URL to a pff file
#[derive(Default)]
pub enum PFF {
#[default]
Init,
WithHeader(HeaderInfo),
}

impl Default for PFF { fn default() -> Self { PFF::Init } }

custom_error! {pub PffError
DecodeError{source: serde_urlencoded::de::Error} = "Invalid meta information file: {source}",
EncodeError{source: serde_urlencoded::ser::Error} = "Unable to generate URL: {source}",
Expand Down

0 comments on commit 17ecc72

Please sign in to comment.