Skip to main content

assert_changes

Function assert_changes 

Source
pub fn assert_changes<T, F>(before: T, f: F, expected_after: T)
where T: PartialEq + Debug, F: FnOnce(),
Expand description

Asserts that a shared value changed to the expected state during closure execution.

This helper is intended for values with shared mutability semantics, such as Rc<Cell<T>>, where the cloned before handle observes the final state.