fix: replace unwrap() with expect() in more files (#729 batch 13) (#3993)

This commit is contained in:
Zhengchao An
2026-06-28 11:45:13 +08:00
committed by GitHub
parent f0ab812213
commit 05d201679c
15 changed files with 126 additions and 126 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ impl Stream for RetryTimer {
self.timer = Some(timer);
}
let mut timer = self.timer.as_mut().unwrap();
let mut timer = self.timer.as_mut().expect("operation should succeed");
match Pin::new(&mut timer).poll_tick(cx) {
Poll::Ready(_) => {
self.rem -= 1;
@@ -151,7 +151,7 @@ pub fn is_request_error_retryable(_err: std::io::Error) -> bool {
}
let uerr = err.(*url.Error);
if uerr.is_ok() {
let e = uerr.unwrap();
let e = uerr.expect("operation should succeed");
return match e.type {
x509.UnknownAuthorityError => {
false