(enabled: bool, lock: MutexGuard<'static, ()>)
| 63 | } |
| 64 | |
| 65 | fn with_lock(enabled: bool, lock: MutexGuard<'static, ()>) -> Self { |
| 66 | let flag = super::AGENT_PROPOSALS_ENABLED |
| 67 | .get_or_init(|| Arc::new(AtomicBool::new(false))) |
| 68 | .clone(); |
| 69 | let prev = flag.swap(enabled, Ordering::Relaxed); |
| 70 | Self { |
| 71 | prev, |
| 72 | flag, |
| 73 | _lock: lock, |
| 74 | } |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | impl Drop for ProposalsFlagGuard { |
nothing calls this directly
no outgoing calls
no test coverage detected