Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mkatychev committed Jul 25, 2024
1 parent 5ad320e commit b159d17
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/src/sparql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

use crate::source::TripleSource;
use crate::term::Term;
use std::borrow::Borrow;
use crate::Error;
use std::borrow::Borrow;

/// A dataset that can be queried with SPARQL.
pub trait SparqlDataset {
Expand Down
2 changes: 1 addition & 1 deletion api/src/term/_simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn ensure_owned(m: MownStr) -> MownStr<'static> {
let m = m.clone();
// Safety: the transmute bellow is safe, because if m.is_owned() is true,
// then it's data is not restricted to lifetime 'a.
unsafe { std::mem::transmute(m) }
unsafe { std::mem::transmute::<mownstr::MownStr<'_>, mownstr::MownStr<'_>>(m) }
} else {
m.to_string().into()
}
Expand Down
2 changes: 1 addition & 1 deletion iri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ pub use std::error::Error;
#[cfg(feature = "threadsafe_err")]
pub use ThreadSafeError as Error;

///! An error trait meant to enable sending errors safely across threads.
/// An error trait meant to enable sending errors safely across threads.
pub trait ThreadSafeError: std::error::Error + Send + Sync + 'static {}
impl<E> ThreadSafeError for E where E: std::error::Error + Send + Sync + 'static {}
2 changes: 1 addition & 1 deletion isomorphism/src/test.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use super::*;
use sophia_api::ns::xsd;
use sophia_api::term::{assert_consistent_term_impl, BnodeId, IriRef, Term, TermKind};
use sophia_api::MownStr;
use sophia_api::Error;
use sophia_api::MownStr;

const FOAF_KNOWS: MyTerm = MyTerm::Iri("http://xmlns.com/foaf/0.1/knows");
const FOAF_MBOX: MyTerm = MyTerm::Iri("http://xmlns.com/foaf/0.1/mbox");
Expand Down
2 changes: 1 addition & 1 deletion turtle/src/serializer/trig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ impl Stringifier for TrigSerializer<Vec<u8>> {
pub(crate) mod test {
use super::*;
use sophia_api::term::SimpleTerm;
use sophia_api::Error;
use sophia_api::{dataset::Dataset, quad::Spog};
use sophia_isomorphism::isomorphic_datasets;
use sophia_api::Error;

const TESTS: &[&str] = &[
"#empty trig",
Expand Down
2 changes: 1 addition & 1 deletion turtle/src/serializer/turtle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ impl Stringifier for TurtleSerializer<Vec<u8>> {
pub(crate) mod test {
use super::*;
use sophia_api::graph::Graph;
use sophia_isomorphism::isomorphic_graphs;
use sophia_api::Error;
use sophia_isomorphism::isomorphic_graphs;

const TESTS: &[&str] = &[
"#empty ttl",
Expand Down

0 comments on commit b159d17

Please sign in to comment.