MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / cell_update

Function cell_update

aiscript-arena/src/metrics.rs:264–266  ·  view source on GitHub ↗
(c: &Cell<T>, f: impl FnOnce(T) -> T)

Source from the content-addressed store, hash-verified

262// https://github.com/rust-lang/rust/issues/50186
263#[inline]
264fn cell_update<T: Copy>(c: &Cell<T>, f: impl FnOnce(T) -> T) {
265 c.set(f(c.get()))
266}
267
268// Computes the `debit_factor` (aka, the amount that debits are multiplied by) from the
269// `timing_factor` configured by the user. It should always be > 1.0.

Callers 6

mark_gc_allocatedMethod · 0.85
mark_gc_tracedMethod · 0.85
mark_gc_deallocatedMethod · 0.85
mark_gc_rememberedMethod · 0.85

Calls 2

setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected