From 8be852662a432d96553fcf7a9fc57c4f3c92baae Mon Sep 17 00:00:00 2001 From: Mica White Date: Mon, 8 Dec 2025 20:03:40 -0500 Subject: Stuff --- src/collection/boxed.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) mode change 100644 => 100755 src/collection/boxed.rs (limited to 'src/collection/boxed.rs') diff --git a/src/collection/boxed.rs b/src/collection/boxed.rs old mode 100644 new mode 100755 index 7767b31..3708c8b --- a/src/collection/boxed.rs +++ b/src/collection/boxed.rs @@ -361,14 +361,18 @@ impl BoxedLockCollection { } } - pub fn scoped_lock<'a, R>(&'a self, key: impl Keyable, f: impl Fn(L::DataMut<'a>) -> R) -> R { + pub fn scoped_lock<'a, R>( + &'a self, + key: impl Keyable, + f: impl FnOnce(L::DataMut<'a>) -> R, + ) -> R { scoped_write(self, key, f) } pub fn scoped_try_lock<'a, Key: Keyable, R>( &'a self, key: Key, - f: impl Fn(L::DataMut<'a>) -> R, + f: impl FnOnce(L::DataMut<'a>) -> R, ) -> Result { scoped_try_write(self, key, f) } @@ -473,14 +477,18 @@ impl BoxedLockCollection { } impl BoxedLockCollection { - pub fn scoped_read<'a, R>(&'a self, key: impl Keyable, f: impl Fn(L::DataRef<'a>) -> R) -> R { + pub fn scoped_read<'a, R>( + &'a self, + key: impl Keyable, + f: impl FnOnce(L::DataRef<'a>) -> R, + ) -> R { scoped_read(self, key, f) } pub fn scoped_try_read<'a, Key: Keyable, R>( &'a self, key: Key, - f: impl Fn(L::DataRef<'a>) -> R, + f: impl FnOnce(L::DataRef<'a>) -> R, ) -> Result { scoped_try_read(self, key, f) } -- cgit v1.2.3