Issue 3223: Second phase of migration to Rust Edition

Reformat via `cargo fmt`
This commit is contained in:
Alexander McLin
2026-04-02 16:08:06 -04:00
parent efbddeaeee
commit fcd6c3f127
40 changed files with 468 additions and 496 deletions

View File

@@ -14,10 +14,10 @@ use std::sync::Mutex;
use std::sync::RwLock;
use std::sync::Weak;
use arcu::Rcu;
use arcu::atomic::Arcu;
use arcu::epoch_counters::GlobalEpochCounterPool;
use arcu::rcu_ref::RcuRef;
use arcu::Rcu;
use indexmap::IndexSet;
use modular_bitfield::prelude::*;
@@ -344,11 +344,7 @@ impl Atom {
let c1 = it.next();
let c2 = it.next();
if c2.is_none() {
c1
} else {
None
}
if c2.is_none() { c1 } else { None }
}
#[inline]
@@ -387,8 +383,10 @@ impl Atom {
}
}
unsafe fn write_to_ptr(string: &str, ptr: *mut u8) {
unsafe { ptr::write(ptr as *mut _, AtomHeader::build_with(string.len() as u64)); }
unsafe fn write_to_ptr(string: &str, ptr: *mut u8) {
unsafe {
ptr::write(ptr as *mut _, AtomHeader::build_with(string.len() as u64));
}
unsafe {
let str_ptr = ptr.add(mem::size_of::<AtomHeader>());
ptr::copy_nonoverlapping(string.as_ptr(), str_ptr, string.len());