Makes Clippy happy

pull/171/head
Tpt 3 years ago
parent 5da9fd4f14
commit 20376ba0dd
  1. 44
      lib/src/storage/numeric_encoder.rs

@ -730,9 +730,10 @@ pub fn insert_term_values<E, F: Fn(&StrHash, &str) -> Result<(), E> + Copy>(
_ => unreachable!("Invalid term encoding {:?} for {}", encoded, term), _ => unreachable!("Invalid term encoding {:?} for {}", encoded, term),
}, },
TermRef::Literal(literal) => match encoded { TermRef::Literal(literal) => match encoded {
EncodedTerm::SmallStringLiteral(..) => Ok(()), EncodedTerm::BigStringLiteral { value_id }
EncodedTerm::BigStringLiteral { value_id } => insert_str(value_id, literal.value()), | EncodedTerm::BigSmallLangStringLiteral { value_id, .. } => {
EncodedTerm::SmallSmallLangStringLiteral { .. } => Ok(()), insert_str(value_id, literal.value())
}
EncodedTerm::SmallBigLangStringLiteral { language_id, .. } => { EncodedTerm::SmallBigLangStringLiteral { language_id, .. } => {
if let Some(language) = literal.language() { if let Some(language) = literal.language() {
insert_str(language_id, language) insert_str(language_id, language)
@ -740,9 +741,6 @@ pub fn insert_term_values<E, F: Fn(&StrHash, &str) -> Result<(), E> + Copy>(
unreachable!("Invalid term encoding {:?} for {}", encoded, term) unreachable!("Invalid term encoding {:?} for {}", encoded, term)
} }
} }
EncodedTerm::BigSmallLangStringLiteral { value_id, .. } => {
insert_str(value_id, literal.value())
}
EncodedTerm::BigBigLangStringLiteral { EncodedTerm::BigBigLangStringLiteral {
value_id, value_id,
language_id, language_id,
@ -764,22 +762,24 @@ pub fn insert_term_values<E, F: Fn(&StrHash, &str) -> Result<(), E> + Copy>(
insert_str(value_id, literal.value())?; insert_str(value_id, literal.value())?;
insert_str(datatype_id, literal.datatype().as_str()) insert_str(datatype_id, literal.datatype().as_str())
} }
EncodedTerm::BooleanLiteral(..) => Ok(()), EncodedTerm::SmallStringLiteral(..)
EncodedTerm::FloatLiteral(..) => Ok(()), | EncodedTerm::SmallSmallLangStringLiteral { .. }
EncodedTerm::DoubleLiteral(..) => Ok(()), | EncodedTerm::BooleanLiteral(..)
EncodedTerm::IntegerLiteral(..) => Ok(()), | EncodedTerm::FloatLiteral(..)
EncodedTerm::DecimalLiteral(..) => Ok(()), | EncodedTerm::DoubleLiteral(..)
EncodedTerm::DateTimeLiteral(..) => Ok(()), | EncodedTerm::IntegerLiteral(..)
EncodedTerm::TimeLiteral(..) => Ok(()), | EncodedTerm::DecimalLiteral(..)
EncodedTerm::DateLiteral(..) => Ok(()), | EncodedTerm::DateTimeLiteral(..)
EncodedTerm::GYearMonthLiteral(..) => Ok(()), | EncodedTerm::TimeLiteral(..)
EncodedTerm::GYearLiteral(..) => Ok(()), | EncodedTerm::DateLiteral(..)
EncodedTerm::GMonthDayLiteral(..) => Ok(()), | EncodedTerm::GYearMonthLiteral(..)
EncodedTerm::GDayLiteral(..) => Ok(()), | EncodedTerm::GYearLiteral(..)
EncodedTerm::GMonthLiteral(..) => Ok(()), | EncodedTerm::GMonthDayLiteral(..)
EncodedTerm::DurationLiteral(..) => Ok(()), | EncodedTerm::GDayLiteral(..)
EncodedTerm::YearMonthDurationLiteral(..) => Ok(()), | EncodedTerm::GMonthLiteral(..)
EncodedTerm::DayTimeDurationLiteral(..) => Ok(()), | EncodedTerm::DurationLiteral(..)
| EncodedTerm::YearMonthDurationLiteral(..)
| EncodedTerm::DayTimeDurationLiteral(..) => Ok(()),
_ => unreachable!("Invalid term encoding {:?} for {}", encoded, term), _ => unreachable!("Invalid term encoding {:?} for {}", encoded, term),
}, },
TermRef::Triple(triple) => { TermRef::Triple(triple) => {

Loading…
Cancel
Save