Clippy fixes
This commit is contained in:
@@ -998,7 +998,7 @@ impl<T: Debug> Response<T> {
|
||||
|
||||
pub fn expect_request_error(self, value: &str) {
|
||||
let err = self.unwrap_request_error();
|
||||
if !err.detail.contains(value) && !err.title.as_ref().map_or(false, |t| t.contains(value)) {
|
||||
if !err.detail.contains(value) && !err.title.as_ref().is_some_and(|t| t.contains(value)) {
|
||||
panic!("Expected request error containing {value:?}, found {err:?}")
|
||||
}
|
||||
}
|
||||
@@ -1006,8 +1006,8 @@ impl<T: Debug> Response<T> {
|
||||
pub fn expect_error(self, value: &str) {
|
||||
let (error, details, reason) = self.unwrap_error();
|
||||
if !error.contains(value)
|
||||
&& !details.as_ref().map_or(false, |d| d.contains(value))
|
||||
&& !reason.as_ref().map_or(false, |r| r.contains(value))
|
||||
&& !details.as_ref().is_some_and(|d| d.contains(value))
|
||||
&& !reason.as_ref().is_some_and(|r| r.contains(value))
|
||||
{
|
||||
panic!("Expected error containing {value:?}, found {error:?}: {details:?} {reason:?}")
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ impl common::listener::SessionManager for SessionManager {
|
||||
let is_encrypted = req
|
||||
.headers()
|
||||
.get(CONTENT_ENCODING)
|
||||
.map_or(false, |encoding| {
|
||||
.is_some_and(|encoding| {
|
||||
encoding.to_str().unwrap() == "aes128gcm"
|
||||
});
|
||||
let body = fetch_body(&mut req, 1024 * 1024, 0).await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user