diff --git a/crates/storage/db/src/abstraction/database.rs b/crates/storage/db/src/abstraction/database.rs index 4de1f4c540..10b6d652e5 100644 --- a/crates/storage/db/src/abstraction/database.rs +++ b/crates/storage/db/src/abstraction/database.rs @@ -26,9 +26,9 @@ pub trait Database: for<'a> DatabaseGAT<'a> { /// Takes a function and passes a read-only transaction into it, making sure it's closed in the /// end of the execution. - fn view(&self, mut f: F) -> Result + fn view(&self, f: F) -> Result where - F: FnMut(&>::TX) -> T, + F: FnOnce(&>::TX) -> T, { let tx = self.tx()?;