Fix clippy warnings

This commit is contained in:
Tobie Morgan Hitchcock 2022-07-10 22:57:19 +01:00
parent 90dfa9f49f
commit b0bcecf5da
4 changed files with 10 additions and 10 deletions

View file

@ -172,9 +172,9 @@ impl Transaction {
return Err(Error::TxReadonly);
}
// Remove the key
let res = self.tx.del(key.into())?;
self.tx.del(key.into())?;
// Return result
Ok(res)
Ok(())
}
// Delete a key
pub fn delc<K, V>(&mut self, key: K, chk: Option<V>) -> Result<(), Error>
@ -191,9 +191,9 @@ impl Transaction {
return Err(Error::TxReadonly);
}
// Remove the key
let res = self.tx.delc(key.into(), chk.map(|v| v.into()))?;
self.tx.delc(key.into(), chk.map(|v| v.into()))?;
// Return result
Ok(res)
Ok(())
}
// Retrieve a range of keys from the databases
pub fn scan<K>(&mut self, rng: Range<K>, limit: u32) -> Result<Vec<(Key, Val)>, Error>

View file

@ -172,9 +172,9 @@ impl Transaction {
return Err(Error::TxReadonly);
}
// Remove the key
let res = self.tx.del(key.into())?;
self.tx.del(key.into())?;
// Return result
Ok(res)
Ok(())
}
// Delete a key
pub fn delc<K, V>(&mut self, key: K, chk: Option<V>) -> Result<(), Error>
@ -191,9 +191,9 @@ impl Transaction {
return Err(Error::TxReadonly);
}
// Remove the key
let res = self.tx.delc(key.into(), chk.map(|v| v.into()))?;
self.tx.delc(key.into(), chk.map(|v| v.into()))?;
// Return result
Ok(res)
Ok(())
}
// Retrieve a range of keys from the databases
pub fn scan<K>(&mut self, rng: Range<K>, limit: u32) -> Result<Vec<(Key, Val)>, Error>

View file

@ -40,7 +40,7 @@ impl From<Vec<i32>> for Array {
}
}
impl<'a> From<Vec<&str>> for Array {
impl From<Vec<&str>> for Array {
fn from(v: Vec<&str>) -> Self {
Array(v.into_iter().map(Value::from).collect())
}

View file

@ -372,7 +372,7 @@ impl From<Operation> for Value {
}
}
impl<'a> From<Vec<&str>> for Value {
impl From<Vec<&str>> for Value {
fn from(v: Vec<&str>) -> Self {
Value::Array(Array::from(v))
}