Skip to content

Commit fe8e063

Browse files
committed
fmt: cargo fmt
1 parent c1e27a8 commit fe8e063

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

src/lib.rs

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ impl<T> Drop for FastQueue<T> {
9999
}
100100

101101
unsafe {
102-
let layout =
103-
Layout::array::<MaybeUninit<T>>(self.capacity.0).expect("Layout calculation failed");
102+
let layout = Layout::array::<MaybeUninit<T>>(self.capacity.0)
103+
.expect("Layout calculation failed");
104104
dealloc(self.buffer.0 as *mut u8, layout);
105105
}
106106
}
@@ -146,7 +146,10 @@ impl<T> Producer<T> {
146146
.head
147147
.store(next_head, Ordering::Release);
148148

149-
#[cfg(any(target_arch = "x86", all(target_arch = "x86_64", target_feature = "sse")))]
149+
#[cfg(any(
150+
target_arch = "x86",
151+
all(target_arch = "x86_64", target_feature = "sse")
152+
))]
150153
{
151154
let next_index = next_head & self.queue.mask;
152155
let next_slot = self.queue.buffer.add(next_index);
@@ -215,7 +218,10 @@ impl<T> Consumer<T> {
215218
.tail
216219
.store(next_tail, Ordering::Release);
217220

218-
#[cfg(any(target_arch = "x86", all(target_arch = "x86_64", target_feature = "sse")))]
221+
#[cfg(any(
222+
target_arch = "x86",
223+
all(target_arch = "x86_64", target_feature = "sse")
224+
))]
219225
{
220226
let next_index = (tail + 1) & self.queue.mask;
221227
let next_slot = self.queue.buffer.add(next_index);
@@ -238,7 +244,10 @@ impl<T> Consumer<T> {
238244
unsafe {
239245
let index = tail & self.queue.mask.0;
240246
let slot = self.queue.buffer.0.add(index);
241-
#[cfg(any(target_arch = "x86", all(target_arch = "x86_64", target_feature = "sse")))]
247+
#[cfg(any(
248+
target_arch = "x86",
249+
all(target_arch = "x86_64", target_feature = "sse")
250+
))]
242251
{
243252
prefetch_read(slot as *const u8);
244253
}
@@ -261,7 +270,10 @@ impl<T> Consumer<T> {
261270
}
262271
}
263272

264-
#[cfg(any(target_arch = "x86", all(target_arch = "x86_64", target_feature = "sse")))]
273+
#[cfg(any(
274+
target_arch = "x86",
275+
all(target_arch = "x86_64", target_feature = "sse")
276+
))]
265277
#[inline(always)]
266278
fn prefetch_read(p: *const u8) {
267279
unsafe {
@@ -275,7 +287,10 @@ fn prefetch_read(p: *const u8) {
275287
}
276288
}
277289

278-
#[cfg(any(target_arch = "x86", all(target_arch = "x86_64", target_feature = "sse")))]
290+
#[cfg(any(
291+
target_arch = "x86",
292+
all(target_arch = "x86_64", target_feature = "sse")
293+
))]
279294
#[inline(always)]
280295
fn prefetch_write(p: *const u8) {
281296
unsafe {

0 commit comments

Comments
 (0)