diff --git a/actix-hash/tests/body_hash.rs b/actix-hash/tests/body_hash.rs index 03e36d50..34c739ba 100644 --- a/actix-hash/tests/body_hash.rs +++ b/actix-hash/tests/body_hash.rs @@ -1,3 +1,5 @@ +#![allow(missing_docs)] + use actix_hash::{BodyHash, BodySha256}; use actix_http::BoxedPayloadStream; use actix_web::{ diff --git a/actix-web-lab-derive/src/lib.rs b/actix-web-lab-derive/src/lib.rs index 95ec0182..3addea77 100644 --- a/actix-web-lab-derive/src/lib.rs +++ b/actix-web-lab-derive/src/lib.rs @@ -98,8 +98,7 @@ pub fn derive_from_request(input: proc_macro::TokenStream) -> proc_macro::TokenS .iter() .filter(|field| { field.attrs.iter().any(|attr| { - attr.parse_args::() - .map_or(false, |ident| ident == "copy_from_app_data") + attr.parse_args::().is_ok_and(|ident| ident == "copy_from_app_data") }) }) .map(|field| { diff --git a/actix-web-lab-derive/tests/tdd.rs b/actix-web-lab-derive/tests/tdd.rs index 6876c564..9e0557e0 100644 --- a/actix-web-lab-derive/tests/tdd.rs +++ b/actix-web-lab-derive/tests/tdd.rs @@ -1,3 +1,5 @@ +#![allow(missing_docs)] + use actix_web::{ http::{Method, StatusCode}, web, App, HttpResponse, Responder, diff --git a/actix-web-lab-derive/tests/trybuild.rs b/actix-web-lab-derive/tests/trybuild.rs index 4ae8155f..ea452dbd 100644 --- a/actix-web-lab-derive/tests/trybuild.rs +++ b/actix-web-lab-derive/tests/trybuild.rs @@ -1,3 +1,5 @@ +#![allow(missing_docs)] + #[rustversion::stable(1.70)] // MSRV #[test] fn compile_macros() { diff --git a/actix-web-lab/src/util.rs b/actix-web-lab/src/util.rs index 66adb30f..f5cb2d67 100644 --- a/actix-web-lab/src/util.rs +++ b/actix-web-lab/src/util.rs @@ -65,13 +65,13 @@ pub fn fork_request_payload(orig_payload: &mut dev::Payload) -> dev::Payload { /// perform a remaining length check before writing. pub(crate) struct MutWriter<'a, B>(pub(crate) &'a mut B); -impl<'a, B> MutWriter<'a, B> { +impl MutWriter<'_, B> { pub fn get_ref(&self) -> &B { self.0 } } -impl<'a, B: BufMut> io::Write for MutWriter<'a, B> { +impl io::Write for MutWriter<'_, B> { fn write(&mut self, buf: &[u8]) -> io::Result { self.0.put_slice(buf); Ok(buf.len()) diff --git a/russe/src/lib.rs b/russe/src/lib.rs index 625174d2..d142c36e 100644 --- a/russe/src/lib.rs +++ b/russe/src/lib.rs @@ -28,6 +28,7 @@ pub const MEDIA_TYPE_STR: &str = "text/event-stream"; #[cfg(test)] mod tests { + /// Asserts that `Option` argument is `None`. #[macro_export] macro_rules! assert_none { ($exp:expr) => {{