Fix clippy warnings
This commit is contained in:
parent
90dfa9f49f
commit
b0bcecf5da
4 changed files with 10 additions and 10 deletions
|
@ -172,9 +172,9 @@ impl Transaction {
|
||||||
return Err(Error::TxReadonly);
|
return Err(Error::TxReadonly);
|
||||||
}
|
}
|
||||||
// Remove the key
|
// Remove the key
|
||||||
let res = self.tx.del(key.into())?;
|
self.tx.del(key.into())?;
|
||||||
// Return result
|
// Return result
|
||||||
Ok(res)
|
Ok(())
|
||||||
}
|
}
|
||||||
// Delete a key
|
// Delete a key
|
||||||
pub fn delc<K, V>(&mut self, key: K, chk: Option<V>) -> Result<(), Error>
|
pub fn delc<K, V>(&mut self, key: K, chk: Option<V>) -> Result<(), Error>
|
||||||
|
@ -191,9 +191,9 @@ impl Transaction {
|
||||||
return Err(Error::TxReadonly);
|
return Err(Error::TxReadonly);
|
||||||
}
|
}
|
||||||
// Remove the key
|
// 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
|
// Return result
|
||||||
Ok(res)
|
Ok(())
|
||||||
}
|
}
|
||||||
// Retrieve a range of keys from the databases
|
// Retrieve a range of keys from the databases
|
||||||
pub fn scan<K>(&mut self, rng: Range<K>, limit: u32) -> Result<Vec<(Key, Val)>, Error>
|
pub fn scan<K>(&mut self, rng: Range<K>, limit: u32) -> Result<Vec<(Key, Val)>, Error>
|
||||||
|
|
|
@ -172,9 +172,9 @@ impl Transaction {
|
||||||
return Err(Error::TxReadonly);
|
return Err(Error::TxReadonly);
|
||||||
}
|
}
|
||||||
// Remove the key
|
// Remove the key
|
||||||
let res = self.tx.del(key.into())?;
|
self.tx.del(key.into())?;
|
||||||
// Return result
|
// Return result
|
||||||
Ok(res)
|
Ok(())
|
||||||
}
|
}
|
||||||
// Delete a key
|
// Delete a key
|
||||||
pub fn delc<K, V>(&mut self, key: K, chk: Option<V>) -> Result<(), Error>
|
pub fn delc<K, V>(&mut self, key: K, chk: Option<V>) -> Result<(), Error>
|
||||||
|
@ -191,9 +191,9 @@ impl Transaction {
|
||||||
return Err(Error::TxReadonly);
|
return Err(Error::TxReadonly);
|
||||||
}
|
}
|
||||||
// Remove the key
|
// 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
|
// Return result
|
||||||
Ok(res)
|
Ok(())
|
||||||
}
|
}
|
||||||
// Retrieve a range of keys from the databases
|
// Retrieve a range of keys from the databases
|
||||||
pub fn scan<K>(&mut self, rng: Range<K>, limit: u32) -> Result<Vec<(Key, Val)>, Error>
|
pub fn scan<K>(&mut self, rng: Range<K>, limit: u32) -> Result<Vec<(Key, Val)>, Error>
|
||||||
|
|
|
@ -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 {
|
fn from(v: Vec<&str>) -> Self {
|
||||||
Array(v.into_iter().map(Value::from).collect())
|
Array(v.into_iter().map(Value::from).collect())
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
fn from(v: Vec<&str>) -> Self {
|
||||||
Value::Array(Array::from(v))
|
Value::Array(Array::from(v))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue