(key: &str)
| 25 | static EXEC_COUNTER: OnceCell<RwLock<HashMap<String, u32>>> = OnceCell::new(); |
| 26 | |
| 27 | pub fn get_exec_counter_value(key: &str) -> Option<u32> { |
| 28 | let guard = EXEC_COUNTER.get_or_init(|| RwLock::new(HashMap::new())).read().unwrap(); |
| 29 | guard.get(key).copied() |
| 30 | } |
| 31 | |
| 32 | pub fn set_exec_counter_value(key: String, value: u32) { |
| 33 | let mut guard = EXEC_COUNTER.get_or_init(|| RwLock::new(HashMap::new())).write().unwrap(); |
no outgoing calls
no test coverage detected