Skip to content

Commit 156cb39

Browse files
committed
simple/cosmetic changes only
1 parent 9a77260 commit 156cb39

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,8 @@ impl<H, T> HeaderVec<H, T> {
493493
pub unsafe fn set_len(&mut self, new_len: usize) {
494494
debug_assert!(
495495
new_len <= self.capacity(),
496-
"new_len is greater than capacity"
496+
"new_len [{new_len}] is greater than capacity [{}]",
497+
self.capacity()
497498
);
498499
self.header_mut().len = new_len.into();
499500
}
@@ -592,7 +593,7 @@ impl<H, T> HeaderVec<H, T> {
592593
const fn offset() -> usize {
593594
// The first location, in units of size_of::<T>(), that is after the header
594595
// It's the end of the header, rounded up to the nearest size_of::<T>()
595-
(mem::size_of::<AlignedHeader<H, T>>()-1) / mem::size_of::<T>() + 1
596+
(mem::size_of::<AlignedHeader<H, T>>() - 1) / mem::size_of::<T>() + 1
596597
}
597598

598599
/// Compute the number of elements (in units of T) to allocate for a given capacity.

0 commit comments

Comments
 (0)