Skip to content

Commit 234c565

Browse files
committed
unnecessary unsafe
1 parent 921874a commit 234c565

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

datafusion/src/execution/memory_manager.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ use std::fmt::{Debug, Display, Formatter};
2626
use std::sync::atomic::{AtomicUsize, Ordering};
2727
use std::sync::{Arc, Condvar, Mutex, Weak};
2828

29-
static mut CONSUMER_ID: AtomicUsize = AtomicUsize::new(0);
29+
static CONSUMER_ID: AtomicUsize = AtomicUsize::new(0);
3030

31-
fn next_id() -> usize {
32-
unsafe { CONSUMER_ID.fetch_add(1, Ordering::SeqCst) }
33-
}
31+
fn next_id() -> usize { CONSUMER_ID.fetch_add(1, Ordering::SeqCst) }
3432

3533
/// Type of the memory consumer
3634
pub enum ConsumerType {

0 commit comments

Comments
 (0)