Skip to content

Commit

Permalink
Auto merge of #231 - Atul9:cargo-fmt, r=mbrubeck
Browse files Browse the repository at this point in the history
Format code using 'cargo fmt'
  • Loading branch information
bors-servo authored Jul 13, 2020
2 parents cce91ca + 7f7ac30 commit f7c7157
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)
}
}
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f7c7157

Please sign in to comment.