This commit is contained in:
Nikolay Kim 2025-01-14 21:58:10 +05:00 committed by GitHub
parent 44fcfd62ff
commit cd56883197
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -256,7 +256,7 @@ pub trait ServiceFactory<Req, Cfg = ()> {
}
}
impl<'a, S, Req> Service<Req> for &'a S
impl<S, Req> Service<Req> for &S
where
S: Service<Req>,
{

View file

@ -143,7 +143,7 @@ impl<Err: ErrorRenderer> Responder<Err> for String {
}
}
impl<'a, Err: ErrorRenderer> Responder<Err> for &'a String {
impl<Err: ErrorRenderer> Responder<Err> for &String {
async fn respond_to(self, _: &HttpRequest) -> Response {
Response::build(StatusCode::OK)
.content_type("text/plain; charset=utf-8")

View file

@ -294,7 +294,7 @@ where
let json = if let Ok(Some(mime)) = req.mime_type() {
mime.subtype() == mime::JSON
|| mime.suffix() == Some(mime::JSON)
|| ctype.as_ref().map_or(false, |predicate| predicate(mime))
|| ctype.as_ref().is_some_and(|predicate| predicate(mime))
} else {
false
};