Skip to content

Commit 510ddee

Browse files
fix: relax fn bound of modify (#6)
1 parent bdba122 commit 510ddee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<
7373
self.modify(|wrapper| wrapper.clone())
7474
}
7575

76-
pub fn modify<U>(&self, mut f: impl FnMut(&Arc<T>) -> U) -> U {
76+
pub fn modify<U>(&self, f: impl FnOnce(&Arc<T>) -> U) -> U {
7777
TlsProvider::global().with_borrow_mut(|blocks| {
7878
let wrapper = blocks.get_mut(self.tls_id.inner());
7979
let register = wrapper.is_none();

0 commit comments

Comments
 (0)