Skip to content

Commit 0040001

Browse files
committed
Apply more clippy suggestions
1 parent cd3a10f commit 0040001

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

download/tests/read-proxy-env.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ fn socks_proxy_request() {
7474
let s = e.source().unwrap();
7575
assert!(
7676
s.to_string().contains("socks connect error"),
77-
"Expected socks connect error, got: {}",
78-
s.to_string()
77+
"Expected socks connect error, got: {s}",
7978
);
8079
assert_eq!(CALL_COUNT.load(Ordering::SeqCst), 1);
8180
} else {

src/utils/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pub(crate) fn download_file_with_resume(
151151
match download_file_(url, path, hasher, resume_from_partial, notify_handler) {
152152
Ok(_) => Ok(()),
153153
Err(e) => {
154-
if let Some(_) = e.downcast_ref::<std::io::Error>() {
154+
if e.downcast_ref::<std::io::Error>().is_some() {
155155
return Err(e);
156156
}
157157
let is_client_error = match e.downcast_ref::<DEK>() {

0 commit comments

Comments
 (0)