From d926fb5645b45d44a35734cb8af1098704df6720 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Champin Date: Mon, 22 Jan 2024 13:04:07 +0100 Subject: [PATCH] pleasing clippy 1.75.0 --- Cargo.toml | 8 ++++---- api/src/ns.rs | 1 - api/src/ns/_term.rs | 16 ++++++++-------- api/src/term.rs | 2 -- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5f02f1ca..7024ed10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,12 +43,12 @@ criterion = "0.5" futures-util = "0.3.28" lazy_static = "1.4.0" mownstr = "0.2.1" -oxiri = "0.2.2" +oxiri = "0.2.3-alpha.1" regex = "1.6.0" resiter = "0.5.0" -rio_api = { version = "0.8", features = ["generalized"] } -rio_turtle = { version = "0.8", features = ["generalized"] } -rio_xml = { version = "0.8" } +rio_api = { version = "0.8", path = "../rio/api", features = ["generalized"] } +rio_turtle = { version = "0.8", path = "../rio/turtle", features = ["generalized"] } +rio_xml = { version = "0.8", path = "../rio/xml" } test-case = "3.1.0" thiserror = "1.0.32" tokio = { version="1.33.0", features = ["rt", "sync"] } diff --git a/api/src/ns.rs b/api/src/ns.rs index 141b0a2c..4d68bf1e 100644 --- a/api/src/ns.rs +++ b/api/src/ns.rs @@ -42,7 +42,6 @@ pub use sophia_iri::IriRef; #[macro_use] mod _macro; -pub use _macro::*; mod _namespace; pub use _namespace::*; mod _term; diff --git a/api/src/ns/_term.rs b/api/src/ns/_term.rs index 6ca0274b..39aec0d0 100644 --- a/api/src/ns/_term.rs +++ b/api/src/ns/_term.rs @@ -77,6 +77,14 @@ impl<'a, T: Term> PartialEq for NsTerm<'a> { impl<'a> Eq for NsTerm<'a> {} +impl<'a> std::ops::Mul> for &'a str { + type Output = crate::term::SimpleTerm<'a>; + + fn mul(self, rhs: NsTerm<'a>) -> Self::Output { + crate::term::SimpleTerm::LiteralDatatype(self.into(), rhs.to_iriref()) + } +} + #[cfg(test)] mod test { use super::*; @@ -102,11 +110,3 @@ mod test { assert!(t3a != t1b); } } - -impl<'a> std::ops::Mul> for &'a str { - type Output = crate::term::SimpleTerm<'a>; - - fn mul(self, rhs: NsTerm<'a>) -> Self::Output { - crate::term::SimpleTerm::LiteralDatatype(self.into(), rhs.to_iriref()) - } -} diff --git a/api/src/term.rs b/api/src/term.rs index b08f10fb..551ec0f4 100644 --- a/api/src/term.rs +++ b/api/src/term.rs @@ -16,9 +16,7 @@ pub use _cmp::*; mod _graph_name; pub use _graph_name::*; mod _native_iri; -pub use _native_iri::*; mod _native_literal; -pub use _native_literal::*; mod _simple; pub use _simple::*;