Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Mar 7, 2022
1 parent 87b1145 commit 4ebc82e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/dzi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ impl TilesRect for DziLevel {
}

fn title(&self) -> Option<String> {
let suffix = match self.base_url.rsplit_once( '/') {
None => "",
Some((_, suffix)) => suffix,
};
let (_, suffix) = self.base_url.rsplit_once( '/').unwrap_or_default();
let name = suffix.trim_end_matches("_files");
Some(name.to_string())
}
Expand Down
2 changes: 1 addition & 1 deletion src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub fn client<'a, I: Iterator<Item=(&'a String, &'a String)>>(
args: &Arguments,
uri: Option<&str>,
) -> Result<reqwest::Client, ZoomError> {
let referer = uri.or_else(|| args.input_uri.as_deref()).unwrap_or("").to_string();
let referer = uri.or(args.input_uri.as_deref()).unwrap_or("").to_string();
let header_map = default_headers()
.iter()
.chain(once((&"Referer".to_string(), &referer)))
Expand Down

0 comments on commit 4ebc82e

Please sign in to comment.