dprint 0.43.0

Binary for dprint code formatter—a pluggable and configurable code formatting platform.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;

#[derive(Default)]
pub struct AtomicCounter(AtomicUsize);

impl AtomicCounter {
  pub fn inc(&self) {
    self.0.fetch_add(1, Ordering::SeqCst);
  }

  pub fn get(&self) -> usize {
    self.0.load(Ordering::SeqCst)
  }
}