MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_write_or_recover_normal

Function test_write_or_recover_normal

core/src/error.rs:215–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213
214 #[test]
215 fn test_write_or_recover_normal() {
216 let lock = std::sync::RwLock::new(42);
217 let mut guard = write_or_recover(&lock);
218 *guard = 99;
219 drop(guard);
220 assert_eq!(*read_or_recover(&lock), 99);
221 }
222
223 #[test]
224 fn test_read_or_recover_poisoned() {

Callers

nothing calls this directly

Calls 1

write_or_recoverFunction · 0.85

Tested by

no test coverage detected