cargo fmt

This commit is contained in:
BenjaminBrienen 2025-03-10 12:42:27 +01:00
parent 87f837cec7
commit 7535bb4661
571 changed files with 2210 additions and 2458 deletions

View file

@ -202,11 +202,7 @@ pub fn trim_indent(mut text: &str) -> String {
text.split_inclusive('\n')
.map(
|line| {
if line.len() <= indent {
line.trim_start_matches(' ')
} else {
&line[indent..]
}
if line.len() <= indent { line.trim_start_matches(' ') } else { &line[indent..] }
},
)
.collect()

View file

@ -158,9 +158,9 @@ mod imp {
};
use miow::{
Overlapped,
iocp::{CompletionPort, CompletionStatus},
pipe::NamedPipe,
Overlapped,
};
use windows_sys::Win32::Foundation::ERROR_BROKEN_PIPE;

View file

@ -1,9 +1,9 @@
use std::alloc::{dealloc, handle_alloc_error, Layout};
use std::alloc::{Layout, dealloc, handle_alloc_error};
use std::fmt;
use std::hash::{Hash, Hasher};
use std::marker::PhantomData;
use std::ops::{Deref, DerefMut};
use std::ptr::{addr_of_mut, slice_from_raw_parts_mut, NonNull};
use std::ptr::{NonNull, addr_of_mut, slice_from_raw_parts_mut};
/// A type that is functionally equivalent to `(Header, Box<[Item]>)`,
/// but all data is stored in one heap allocation and the pointer is thin,
@ -322,11 +322,7 @@ impl<T> EmptyOptimizedThinVec<T> {
I::IntoIter: TrustedLen<Item = T>,
{
let values = values.into_iter();
if values.len() == 0 {
Self::empty()
} else {
Self(Some(ThinVec::from_iter(values)))
}
if values.len() == 0 { Self::empty() } else { Self(Some(ThinVec::from_iter(values))) }
}
#[inline]

View file

@ -10,8 +10,8 @@
use std::{
panic::{self, UnwindSafe},
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
atomic::{AtomicUsize, Ordering},
},
};