mirror of
https://github.com/openharmony/third_party_rust_rust-smallvec.git
synced 2026-07-19 23:03:32 -04:00
Auto merge of #231 - Atul9:cargo-fmt, r=mbrubeck
Format code using 'cargo fmt'
This commit is contained in:
+7
-2
@@ -680,7 +680,11 @@ impl<A: Array> SmallVec<A> {
|
||||
let &mut (ptr, ref mut len_ptr) = self.data.heap_mut();
|
||||
(ptr, len_ptr, self.capacity)
|
||||
} else {
|
||||
(self.data.inline_mut(), &mut self.capacity, Self::inline_capacity())
|
||||
(
|
||||
self.data.inline_mut(),
|
||||
&mut self.capacity,
|
||||
Self::inline_capacity(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1083,7 +1087,8 @@ impl<A: Array> SmallVec<A> {
|
||||
/// This method returns `Err(Self)` if the SmallVec is too short (and the `A` contains uninitialized elements),
|
||||
/// or if the SmallVec is too long (and all the elements were spilled to the heap).
|
||||
pub fn into_inner(self) -> Result<A, Self> {
|
||||
if self.spilled() || self.len() != A::size() { // Note: A::size, not Self::inline_capacity
|
||||
if self.spilled() || self.len() != A::size() {
|
||||
// Note: A::size, not Self::inline_capacity
|
||||
Err(self)
|
||||
} else {
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user