diff options
author | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-28 14:22:29 -0500 |
---|---|---|
committer | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-28 14:22:29 -0500 |
commit | 7e07687b5ec14bd788b8d2dd3f0a7ead83842fd4 (patch) | |
tree | 795df5d4e91e44e50214437dc0c77f25db66b870 /src/types/extract.rs | |
parent | docker (diff) | |
download | xssbook-7e07687b5ec14bd788b8d2dd3f0a7ead83842fd4.tar.gz xssbook-7e07687b5ec14bd788b8d2dd3f0a7ead83842fd4.tar.bz2 xssbook-7e07687b5ec14bd788b8d2dd3f0a7ead83842fd4.zip |
clippy my beloved
Diffstat (limited to 'src/types/extract.rs')
-rw-r--r-- | src/types/extract.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/types/extract.rs b/src/types/extract.rs index 69c6ed8..7dbf386 100644 --- a/src/types/extract.rs +++ b/src/types/extract.rs @@ -22,7 +22,7 @@ impl<S> FromRequestParts<S> for AuthorizedUser where S: Send + Sync { return Err(ResponseCode::Forbidden.text("No auth token provided")) }; - let Ok(session) = Session::from_token(&token) else { + let Ok(session) = Session::from_token(token) else { return Err(ResponseCode::Unauthorized.text("Auth token invalid")) }; @@ -55,16 +55,16 @@ impl<S, B> FromRequest<S, B> for Log where let uri = req.uri().clone(); let Ok(bytes) = Bytes::from_request(req, state).await else { - console::log(info.ip().clone(), method.clone(), uri.clone(), Some(path.to_string()), None).await; + console::log(info.ip(), method.clone(), uri.clone(), Some(path.to_string()), None).await; return Ok(Log) }; let Ok(body) = String::from_utf8(bytes.bytes().flatten().collect()) else { - console::log(info.ip().clone(), method.clone(), uri.clone(), Some(path.to_string()), None).await; + console::log(info.ip(), method.clone(), uri.clone(), Some(path.to_string()), None).await; return Ok(Log) }; - console::log(info.ip().clone(), method.clone(), uri.clone(), Some(path.to_string()), Some(body.to_string())).await; + console::log(info.ip(), method.clone(), uri.clone(), Some(path.to_string()), Some(body.to_string())).await; Ok(Log) } @@ -101,7 +101,7 @@ impl<T, S, B> FromRequest<S, B> for Json<T> where return Err(ResponseCode::BadRequest.text("Invalid utf8 body")) }; - console::log(info.ip().clone(), method.clone(), uri.clone(), Some(path.to_string()), Some(body.to_string())).await; + console::log(info.ip(), method.clone(), uri.clone(), Some(path.to_string()), Some(body.to_string())).await; let Ok(value) = serde_json::from_str::<T>(&body) else { return Err(ResponseCode::BadRequest.text("Invalid request body")) |