diff --git a/lib/oxrdf/src/interning.rs b/lib/oxrdf/src/interning.rs index 54c8acde..2e3d62f2 100644 --- a/lib/oxrdf/src/interning.rs +++ b/lib/oxrdf/src/interning.rs @@ -13,6 +13,7 @@ pub struct Interner { } impl Interner { + #[allow(clippy::never_loop)] fn get_or_intern(&mut self, value: &str) -> Key { let mut hash = self.hash(value); loop { diff --git a/lib/spargebra/src/query.rs b/lib/spargebra/src/query.rs index 9f927a8d..6cb7e57b 100644 --- a/lib/spargebra/src/query.rs +++ b/lib/spargebra/src/query.rs @@ -210,7 +210,7 @@ impl fmt::Display for Query { writeln!(f, "BASE <{base_iri}>")?; } write!(f, "CONSTRUCT {{ ")?; - for triple in template.iter() { + for triple in template { write!(f, "{triple} . ")?; } write!(f, "}}")?; diff --git a/lib/src/io/read.rs b/lib/src/io/read.rs index 5d5ddeb2..b407fd9f 100644 --- a/lib/src/io/read.rs +++ b/lib/src/io/read.rs @@ -321,7 +321,7 @@ impl<'a> RioMapper { fn blank_node(&mut self, node: rio::BlankNode<'a>) -> BlankNode { self.bnode_map .entry(node.id.to_owned()) - .or_insert_with(BlankNode::default) + .or_default() .clone() } diff --git a/lib/src/sparql/plan.rs b/lib/src/sparql/plan.rs index 88469433..5ca5cc03 100644 --- a/lib/src/sparql/plan.rs +++ b/lib/src/sparql/plan.rs @@ -156,7 +156,7 @@ impl PlanNode { child.lookup_used_variables(callback); } Self::Union { children } => { - for child in children.iter() { + for child in children { child.lookup_used_variables(callback); } } diff --git a/lib/src/sparql/plan_builder.rs b/lib/src/sparql/plan_builder.rs index 5e7370c1..02432883 100644 --- a/lib/src/sparql/plan_builder.rs +++ b/lib/src/sparql/plan_builder.rs @@ -1280,7 +1280,7 @@ impl<'a> PlanBuilder<'a> { Self::add_left_join_problematic_variables(child, set); } PlanNode::Union { children } => { - for child in children.iter() { + for child in children { Self::add_left_join_problematic_variables(child, set); } } diff --git a/lib/src/storage/numeric_encoder.rs b/lib/src/storage/numeric_encoder.rs index 73b00fe3..9a084ff7 100644 --- a/lib/src/storage/numeric_encoder.rs +++ b/lib/src/storage/numeric_encoder.rs @@ -531,7 +531,6 @@ impl From> for EncodedTerm { } "http://www.w3.org/2001/XMLSchema#boolean" => parse_boolean_str(value), "http://www.w3.org/2001/XMLSchema#string" => { - let value = value; Some(if let Ok(value) = SmallString::try_from(value) { Self::SmallStringLiteral(value) } else { diff --git a/lib/src/storage/small_string.rs b/lib/src/storage/small_string.rs index 4bb1520b..a7134bd6 100644 --- a/lib/src/storage/small_string.rs +++ b/lib/src/storage/small_string.rs @@ -112,7 +112,7 @@ impl Eq for SmallString {} impl PartialOrd for SmallString { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - self.as_str().partial_cmp(other.as_str()) + Some(self.cmp(other)) } }