Skip to content

Commit

Permalink
pleasing clippy 1.75.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pchampin committed Jan 22, 2024
1 parent 9e934a7 commit 182c461
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion api/src/ns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pub use sophia_iri::IriRef;

#[macro_use]
mod _macro;
pub use _macro::*;
mod _namespace;
pub use _namespace::*;
mod _term;
Expand Down
16 changes: 8 additions & 8 deletions api/src/ns/_term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ impl<'a, T: Term> PartialEq<T> for NsTerm<'a> {

impl<'a> Eq for NsTerm<'a> {}

impl<'a> std::ops::Mul<NsTerm<'a>> 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::*;
Expand All @@ -102,11 +110,3 @@ mod test {
assert!(t3a != t1b);
}
}

impl<'a> std::ops::Mul<NsTerm<'a>> 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())
}
}
2 changes: 0 additions & 2 deletions api/src/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down

0 comments on commit 182c461

Please sign in to comment.