diff --git a/cli/src/main.rs b/cli/src/main.rs index cf6788d9..e4cba504 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1852,9 +1852,8 @@ fn systemd_notify_ready() -> io::Result<()> { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; use anyhow::Result; use assert_cmd::Command; diff --git a/lib/oxigraph/src/sparql/eval.rs b/lib/oxigraph/src/sparql/eval.rs index d75f0761..b2244b04 100644 --- a/lib/oxigraph/src/sparql/eval.rs +++ b/lib/oxigraph/src/sparql/eval.rs @@ -5852,9 +5852,8 @@ impl Timer { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxigraph/src/sparql/model.rs b/lib/oxigraph/src/sparql/model.rs index a62264ba..0fca83e9 100644 --- a/lib/oxigraph/src/sparql/model.rs +++ b/lib/oxigraph/src/sparql/model.rs @@ -277,9 +277,8 @@ impl Iterator for QueryTripleIter { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; use std::io::Cursor; diff --git a/lib/oxigraph/src/storage/binary_encoder.rs b/lib/oxigraph/src/storage/binary_encoder.rs index 1c32bdba..dd853a08 100644 --- a/lib/oxigraph/src/storage/binary_encoder.rs +++ b/lib/oxigraph/src/storage/binary_encoder.rs @@ -632,9 +632,8 @@ pub fn write_term(sink: &mut Vec, term: &EncodedTerm) { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; use crate::model::TermRef; use crate::storage::numeric_encoder::*; diff --git a/lib/oxigraph/src/store.rs b/lib/oxigraph/src/store.rs index e86df073..fe857345 100644 --- a/lib/oxigraph/src/store.rs +++ b/lib/oxigraph/src/store.rs @@ -1914,9 +1914,8 @@ impl BulkLoader { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxrdf/src/blank_node.rs b/lib/oxrdf/src/blank_node.rs index 6d565fda..4bf82391 100644 --- a/lib/oxrdf/src/blank_node.rs +++ b/lib/oxrdf/src/blank_node.rs @@ -349,9 +349,8 @@ fn to_integer_id(id: &str) -> Option { pub struct BlankNodeIdParseError; #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxrdf/src/literal.rs b/lib/oxrdf/src/literal.rs index 47da00ff..5f7ab9e0 100644 --- a/lib/oxrdf/src/literal.rs +++ b/lib/oxrdf/src/literal.rs @@ -632,9 +632,8 @@ pub fn print_quoted_str(string: &str, f: &mut impl Write) -> fmt::Result { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxrdf/src/triple.rs b/lib/oxrdf/src/triple.rs index 960edcd1..d5526c19 100644 --- a/lib/oxrdf/src/triple.rs +++ b/lib/oxrdf/src/triple.rs @@ -1324,9 +1324,8 @@ impl TryFromTermError { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxsdatatypes/src/boolean.rs b/lib/oxsdatatypes/src/boolean.rs index ad231c47..c881765c 100644 --- a/lib/oxsdatatypes/src/boolean.rs +++ b/lib/oxsdatatypes/src/boolean.rs @@ -84,9 +84,8 @@ impl fmt::Display for Boolean { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxsdatatypes/src/date_time.rs b/lib/oxsdatatypes/src/date_time.rs index d508c0dd..579f72b7 100644 --- a/lib/oxsdatatypes/src/date_time.rs +++ b/lib/oxsdatatypes/src/date_time.rs @@ -2414,9 +2414,8 @@ pub struct InvalidTimezoneError { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; use std::error::Error; diff --git a/lib/oxsdatatypes/src/decimal.rs b/lib/oxsdatatypes/src/decimal.rs index 72740dc1..3383ad48 100644 --- a/lib/oxsdatatypes/src/decimal.rs +++ b/lib/oxsdatatypes/src/decimal.rs @@ -645,9 +645,8 @@ impl From for ParseDecimalError { pub struct TooLargeForDecimalError; #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxsdatatypes/src/double.rs b/lib/oxsdatatypes/src/double.rs index 3b58858f..12937ada 100644 --- a/lib/oxsdatatypes/src/double.rs +++ b/lib/oxsdatatypes/src/double.rs @@ -256,9 +256,8 @@ impl Div for Double { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxsdatatypes/src/duration.rs b/lib/oxsdatatypes/src/duration.rs index fe0514ab..719bfad2 100644 --- a/lib/oxsdatatypes/src/duration.rs +++ b/lib/oxsdatatypes/src/duration.rs @@ -974,9 +974,8 @@ impl From for ParseDurationError { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; use std::error::Error; diff --git a/lib/oxsdatatypes/src/float.rs b/lib/oxsdatatypes/src/float.rs index c4d08d6c..99274316 100644 --- a/lib/oxsdatatypes/src/float.rs +++ b/lib/oxsdatatypes/src/float.rs @@ -246,9 +246,8 @@ impl Div for Float { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxsdatatypes/src/integer.rs b/lib/oxsdatatypes/src/integer.rs index d0a693ea..6e01d1f2 100644 --- a/lib/oxsdatatypes/src/integer.rs +++ b/lib/oxsdatatypes/src/integer.rs @@ -268,9 +268,8 @@ impl TryFrom for Integer { pub struct TooLargeForIntegerError; #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; #[test] diff --git a/lib/oxttl/src/trig.rs b/lib/oxttl/src/trig.rs index e4c5a0b0..7f4b20c7 100644 --- a/lib/oxttl/src/trig.rs +++ b/lib/oxttl/src/trig.rs @@ -1190,9 +1190,8 @@ fn can_be_escaped_in_local_name(c: char) -> bool { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; use oxrdf::BlankNodeRef; diff --git a/lib/oxttl/src/turtle.rs b/lib/oxttl/src/turtle.rs index eb972224..24e5ba80 100644 --- a/lib/oxttl/src/turtle.rs +++ b/lib/oxttl/src/turtle.rs @@ -844,9 +844,8 @@ impl LowLevelTurtleWriter { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; use oxrdf::{BlankNodeRef, LiteralRef, NamedNodeRef}; diff --git a/lib/sparesults/src/csv.rs b/lib/sparesults/src/csv.rs index a05aa2da..81ce230d 100644 --- a/lib/sparesults/src/csv.rs +++ b/lib/sparesults/src/csv.rs @@ -754,9 +754,8 @@ impl LineReader { } #[cfg(test)] +#[allow(clippy::panic_in_result_fn)] mod tests { - #![allow(clippy::panic_in_result_fn)] - use super::*; use std::error::Error;