mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-03-31 11:27:38 +03:00
Clippy (#499)
This commit is contained in:
parent
44fcfd62ff
commit
cd56883197
3 changed files with 3 additions and 3 deletions
|
@ -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>,
|
||||
{
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue