Clippy fixes

This commit is contained in:
mdecimus
2024-12-01 20:13:06 +13:00
parent 4f02e4c96f
commit 03d9dabed3
27 changed files with 115 additions and 119 deletions

View File

@@ -152,7 +152,7 @@ enum CommitError {
RocksDB(rocksdb::Error),
}
impl<'x> RocksDBTransaction<'x> {
impl RocksDBTransaction<'_> {
fn commit(&self) -> Result<AssignedIds, CommitError> {
let mut account_id = u32::MAX;
let mut collection = u8::MAX;

View File

@@ -539,7 +539,7 @@ impl<'x> From<&'x str> for Value<'x> {
}
}
impl<'x> From<String> for Value<'x> {
impl From<String> for Value<'_> {
fn from(value: String) -> Self {
Self::Text(value.into())
}
@@ -557,13 +557,13 @@ impl<'x> From<Cow<'x, str>> for Value<'x> {
}
}
impl<'x> From<bool> for Value<'x> {
impl From<bool> for Value<'_> {
fn from(value: bool) -> Self {
Self::Bool(value)
}
}
impl<'x> From<i64> for Value<'x> {
impl From<i64> for Value<'_> {
fn from(value: i64) -> Self {
Self::Integer(value)
}
@@ -579,19 +579,19 @@ impl From<Value<'static>> for i64 {
}
}
impl<'x> From<u64> for Value<'x> {
impl From<u64> for Value<'_> {
fn from(value: u64) -> Self {
Self::Integer(value as i64)
}
}
impl<'x> From<u32> for Value<'x> {
impl From<u32> for Value<'_> {
fn from(value: u32) -> Self {
Self::Integer(value as i64)
}
}
impl<'x> From<f64> for Value<'x> {
impl From<f64> for Value<'_> {
fn from(value: f64) -> Self {
Self::Float(value)
}
@@ -603,13 +603,13 @@ impl<'x> From<&'x [u8]> for Value<'x> {
}
}
impl<'x> From<Vec<u8>> for Value<'x> {
impl From<Vec<u8>> for Value<'_> {
fn from(value: Vec<u8>) -> Self {
Self::Blob(value.into())
}
}
impl<'x> Value<'x> {
impl Value<'_> {
pub fn into_string(self) -> String {
match self {
Value::Text(s) => s.into_owned(),