Skip to content

Commit

Permalink
Apply more clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Oct 8, 2023
1 parent cd3a10f commit 0040001
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions download/tests/read-proxy-env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ fn socks_proxy_request() {
let s = e.source().unwrap();
assert!(
s.to_string().contains("socks connect error"),
"Expected socks connect error, got: {}",
s.to_string()
"Expected socks connect error, got: {s}",
);
assert_eq!(CALL_COUNT.load(Ordering::SeqCst), 1);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ pub(crate) fn download_file_with_resume(
match download_file_(url, path, hasher, resume_from_partial, notify_handler) {
Ok(_) => Ok(()),
Err(e) => {
if let Some(_) = e.downcast_ref::<std::io::Error>() {
if e.downcast_ref::<std::io::Error>().is_some() {
return Err(e);
}
let is_client_error = match e.downcast_ref::<DEK>() {
Expand Down

0 comments on commit 0040001

Please sign in to comment.