We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9307c9 commit 4bee898Copy full SHA for 4bee898
library/std/src/os/custom/mod.rs
@@ -71,7 +71,7 @@ macro_rules! static_rwlock_box_impl {
71
///
72
/// Removing an implementation (i.e. setting the internal singleton to `None`)
73
/// is intentionally not allowed.
74
- pub fn set_impl<F: FnMut(Option<Box<dyn $api>>) -> Box<dyn $api>>(mut transition: F) {
+ pub fn set_impl<F: FnOnce(Option<Box<dyn $api>>) -> Box<dyn $api>>(transition: F) {
75
let mut writer = IMPL.write().expect("poisoned lock");
76
let maybe_impl = core::mem::replace(&mut *writer, None);
77
let new_impl = transition(maybe_impl);
0 commit comments