mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-08-15 01:45:58 -04:00
more clippy
This commit is contained in:
parent
f596b3ce05
commit
20451af880
18 changed files with 115 additions and 122 deletions
|
@ -23,7 +23,9 @@ impl VeilidTableDB {
|
|||
|
||||
fn getTableDB(&self) -> APIResult<TableDB> {
|
||||
let Some(table_db) = &self.inner_table_db else {
|
||||
return APIResult::Err(veilid_core::VeilidAPIError::generic("Unable to getTableDB instance. Ensure you've called openTable()."));
|
||||
return APIResult::Err(veilid_core::VeilidAPIError::generic(
|
||||
"Unable to getTableDB instance. Ensure you've called openTable().",
|
||||
));
|
||||
};
|
||||
APIResult::Ok(table_db.clone())
|
||||
}
|
||||
|
@ -140,7 +142,9 @@ impl VeilidTableDBTransaction {
|
|||
|
||||
fn getTransaction(&self) -> APIResult<TableDBTransaction> {
|
||||
let Some(transaction) = &self.inner_transaction else {
|
||||
return APIResult::Err(veilid_core::VeilidAPIError::generic("Unable to getTransaction instance. inner_transaction is None."));
|
||||
return APIResult::Err(veilid_core::VeilidAPIError::generic(
|
||||
"Unable to getTransaction instance. inner_transaction is None.",
|
||||
));
|
||||
};
|
||||
APIResult::Ok(transaction.clone())
|
||||
}
|
||||
|
@ -174,3 +178,9 @@ impl VeilidTableDBTransaction {
|
|||
transaction.delete(col, &key)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for VeilidTableDBTransaction {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue