MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / and_modify

Method and_modify

src/entity/sparse.rs:432–440  ·  view source on GitHub ↗
(mut self, f: F)

Source from the content-addressed store, hash-verified

430 where
431 F: FnOnce(&mut V),
432 {
433 if let Entry::Occupied(entry) = &mut self {
434 f(entry.get_mut());
435 }
436 self
437 }
438
439 /// Inserts a default-constructed value in the entry if it is vacant and returns a mutable
440 /// reference to it. Otherwise a mutable reference to an already existent value is returned.
441 #[inline]
442 pub fn or_default(self) -> &'a mut V
443 where

Callers

nothing calls this directly

Calls 1

get_mutMethod · 0.45

Tested by

no test coverage detected