Overhaul error handling

This commit is contained in:
Joscha 2023-03-18 13:36:48 +01:00
parent 028c72cac4
commit 2bf19e0ea2
4 changed files with 48 additions and 35 deletions

View file

@ -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)
}
}