Skip to content

Commit

Permalink
unnecessary unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
yjshen committed Jan 12, 2022
1 parent 921874a commit 234c565
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions datafusion/src/execution/memory_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ use std::fmt::{Debug, Display, Formatter};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Condvar, Mutex, Weak};

static mut CONSUMER_ID: AtomicUsize = AtomicUsize::new(0);
static CONSUMER_ID: AtomicUsize = AtomicUsize::new(0);

fn next_id() -> usize {
unsafe { CONSUMER_ID.fetch_add(1, Ordering::SeqCst) }
}
fn next_id() -> usize { CONSUMER_ID.fetch_add(1, Ordering::SeqCst) }

/// Type of the memory consumer
pub enum ConsumerType {
Expand Down

0 comments on commit 234c565

Please sign in to comment.