Overhaul error handling
This commit is contained in:
parent
028c72cac4
commit
2bf19e0ea2
4 changed files with 48 additions and 35 deletions
|
|
@ -52,11 +52,7 @@ impl SimpleVault {
|
|||
}
|
||||
|
||||
/// Execute an [`Action`] and return the result.
|
||||
pub fn execute<A>(&mut self, action: A) -> rusqlite::Result<A::Result>
|
||||
where
|
||||
A: Action + Send + 'static,
|
||||
A::Result: Send,
|
||||
{
|
||||
pub fn execute<A: Action>(&mut self, action: A) -> Result<A::Result, A::Error> {
|
||||
action.run(&mut self.0)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue