diff --git a/Cargo.toml b/Cargo.toml index cf39a5bd..bd9cd25d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,6 +104,7 @@ as_underscore = "warn" large_stack_frames = "warn" mem_forget = "warn" mixed_read_write_in_expression = "warn" +needless_raw_strings = "warn" # == Style, readability == # semicolon_outside_block = "warn" # With semicolon-outside-block-ignore-multiline = true diff --git a/crates/ironrdp-graphics/src/rdp6/rle.rs b/crates/ironrdp-graphics/src/rdp6/rle.rs index e423824a..e8540f21 100644 --- a/crates/ironrdp-graphics/src/rdp6/rle.rs +++ b/crates/ironrdp-graphics/src/rdp6/rle.rs @@ -390,6 +390,10 @@ pub(crate) fn compress_8bpp_plane( } #[cfg(test)] +#[expect( + clippy::needless_raw_strings, + reason = "the lint is disable to not interfere with expect! macro" +)] mod tests { use expect_test::expect; diff --git a/crates/ironrdp-pdu/src/basic_output/bitmap/rdp6.rs b/crates/ironrdp-pdu/src/basic_output/bitmap/rdp6.rs index c2153736..dc8b5a54 100644 --- a/crates/ironrdp-pdu/src/basic_output/bitmap/rdp6.rs +++ b/crates/ironrdp-pdu/src/basic_output/bitmap/rdp6.rs @@ -166,6 +166,10 @@ impl Encode for BitmapStream<'_> { #[cfg(test)] #[cfg(feature = "alloc")] +#[expect( + clippy::needless_raw_strings, + reason = "the lint is disable to not interfere with expect! macro" +)] mod tests { use expect_test::{expect, Expect}; diff --git a/crates/ironrdp-pdu/src/per.rs b/crates/ironrdp-pdu/src/per.rs index 9f1deb8a..dc76a2cb 100644 --- a/crates/ironrdp-pdu/src/per.rs +++ b/crates/ironrdp-pdu/src/per.rs @@ -555,6 +555,10 @@ pub(crate) mod legacy { } #[cfg(test)] +#[expect( + clippy::needless_raw_strings, + reason = "the lint is disable to not interfere with expect! macro" +)] mod tests { use expect_test::expect; diff --git a/crates/ironrdp-testsuite-core/tests/pdu/mod.rs b/crates/ironrdp-testsuite-core/tests/pdu/mod.rs index 13110c52..7f0610d2 100644 --- a/crates/ironrdp-testsuite-core/tests/pdu/mod.rs +++ b/crates/ironrdp-testsuite-core/tests/pdu/mod.rs @@ -2,6 +2,10 @@ mod gcc; mod gfx; mod input; mod mcs; +#[expect( + clippy::needless_raw_strings, + reason = "the lint is disable to not interfere with expect! macro" +)] mod pointer; mod rdp; mod rfx; diff --git a/crates/ironrdp-testsuite-core/tests/propertyset.rs b/crates/ironrdp-testsuite-core/tests/propertyset.rs index 363451e2..bbd4b798 100644 --- a/crates/ironrdp-testsuite-core/tests/propertyset.rs +++ b/crates/ironrdp-testsuite-core/tests/propertyset.rs @@ -1,7 +1,7 @@ use expect_test::expect; use ironrdp_rdpfile::ParseResult; -const RDP_FILE_SAMPLE: &str = r#"remoteapplicationmode:i:0 +const RDP_FILE_SAMPLE: &str = "remoteapplicationmode:i:0 server port:i:3389 promptcredentialonce:i:1 full address:s:192.168.56.101 @@ -11,11 +11,11 @@ alternate full address:s:some.alternateaddress.ninja username:s:David ClearTextPassword:s:Devolutions123! MalformedLine:s -UnknownType:z:10293"#; +UnknownType:z:10293"; -const RDP_FILE_SAMPLE_2: &str = r#"remoteapplicationmode:i:50 +const RDP_FILE_SAMPLE_2: &str = "remoteapplicationmode:i:50 server port:i:4000 -full address:s:192.168.56.2"#; +full address:s:192.168.56.2"; #[test] fn parse_file() { diff --git a/xtask/src/cov.rs b/xtask/src/cov.rs index 4c957d85..f5a3e0c7 100644 --- a/xtask/src/cov.rs +++ b/xtask/src/cov.rs @@ -3,7 +3,7 @@ use core::fmt; use crate::prelude::*; const COV_IGNORE_REGEX: &str = - r#"(crates/ironrdp-(session|.+generators|.+glutin.+|replay|client|fuzzing|tokio|web|futures|tls)|xtask|testsuite)"#; + "(crates/ironrdp-(session|.+generators|.+glutin.+|replay|client|fuzzing|tokio|web|futures|tls)|xtask|testsuite)"; pub fn install(sh: &Shell) -> anyhow::Result<()> { let _s = Section::new("COV-INSTALL");