diff --git a/src/advance/global-variable.md b/src/advance/global-variable.md index 80d8c47e..da8b742a 100644 --- a/src/advance/global-variable.md +++ b/src/advance/global-variable.md @@ -93,7 +93,7 @@ fn generate_id()->usize{ if current_val > MAX_ID{ panic!("Factory ids overflowed"); } - GLOBAL_ID_COUNTER.fetch_add(1, Ordering::Relaxed) + GLOBAL_ID_COUNTER.fetch_add(1, Ordering::Relaxed); let next_id = GLOBAL_ID_COUNTER.load(Ordering::Relaxed); if next_id > MAX_ID{ panic!("Factory ids overflowed");