Makes recent Clippy happy

pull/644/head
Tpt 12 months ago committed by Thomas Tanon
parent 666a00cfab
commit b777d0110a
  1. 1
      lib/oxrdf/src/interning.rs
  2. 2
      lib/spargebra/src/query.rs
  3. 2
      lib/src/io/read.rs
  4. 2
      lib/src/sparql/plan.rs
  5. 2
      lib/src/sparql/plan_builder.rs
  6. 1
      lib/src/storage/numeric_encoder.rs
  7. 2
      lib/src/storage/small_string.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 {

@ -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, "}}")?;

@ -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()
}

@ -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);
}
}

@ -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);
}
}

@ -531,7 +531,6 @@ impl From<LiteralRef<'_>> 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 {

@ -112,7 +112,7 @@ impl Eq for SmallString {}
impl PartialOrd for SmallString {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.as_str().partial_cmp(other.as_str())
Some(self.cmp(other))
}
}

Loading…
Cancel
Save