Issue 3223: reformat via cargo fmt

This commit is contained in:
Alexander McLin
2026-06-16 21:18:49 -04:00
parent eabbf67e86
commit ea88ca552d

View File

@@ -211,7 +211,8 @@ impl<T: RawBlockTraits> SerialOffsetTable<T> {
})
}
unsafe fn build_with(&mut self, value: T) -> usize { unsafe {
unsafe fn build_with(&mut self, value: T) -> usize {
unsafe {
let mut ptr;
loop {
@@ -228,17 +229,18 @@ impl<T: RawBlockTraits> SerialOffsetTable<T> {
ptr::write(ptr as *mut T, value);
// SAFETY: `ptr` was obtained from `self.block.alloc()`
self.block.get_offset(ptr)
}}
}
}
#[inline]
unsafe fn lookup(&self, offset: usize) -> &T { unsafe {
&*self.block.get_unchecked(offset).cast::<T>()
}}
unsafe fn lookup(&self, offset: usize) -> &T {
unsafe { &*self.block.get_unchecked(offset).cast::<T>() }
}
#[inline]
unsafe fn lookup_mut(&mut self, offset: usize) -> &mut T { unsafe {
&mut *self.block.get_unchecked(offset).cast::<T>().cast_mut()
}}
unsafe fn lookup_mut(&mut self, offset: usize) -> &mut T {
unsafe { &mut *self.block.get_unchecked(offset).cast::<T>().cast_mut() }
}
#[allow(clippy::wrong_self_convention)]
fn to_concurrent(&mut self) -> ConcurrentOffsetTable<T>