We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
modify
1 parent bdba122 commit 510ddeeCopy full SHA for 510ddee
1 file changed
src/tls.rs
@@ -73,7 +73,7 @@ impl<
73
self.modify(|wrapper| wrapper.clone())
74
}
75
76
- pub fn modify<U>(&self, mut f: impl FnMut(&Arc<T>) -> U) -> U {
+ pub fn modify<U>(&self, f: impl FnOnce(&Arc<T>) -> U) -> U {
77
TlsProvider::global().with_borrow_mut(|blocks| {
78
let wrapper = blocks.get_mut(self.tls_id.inner());
79
let register = wrapper.is_none();
0 commit comments