MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / update

Method update

crates/opencode-tui/src/hooks/use_state.rs:26–32  ·  view source on GitHub ↗
(&self, f: F)

Source from the content-addressed store, hash-verified

24 }
25
26 pub fn update<F>(&self, f: F)
27 where
28 F: FnOnce(&mut T),
29 {
30 f(&mut self.value.borrow_mut());
31 *self.changed.borrow_mut() = true;
32 }
33
34 pub fn changed(&self) -> bool {
35 *self.changed.borrow()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected