Skip to content

Commit 9a77260

Browse files
committed
Merge branch 'feature-atomic-append' into feature-std-compatibility
2 parents 723dcdf + 25788c1 commit 9a77260

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ impl<H, T> HeaderVec<H, T> {
592592
const fn offset() -> usize {
593593
// The first location, in units of size_of::<T>(), that is after the header
594594
// It's the end of the header, rounded up to the nearest size_of::<T>()
595-
mem::size_of::<AlignedHeader<H, T>>() / mem::size_of::<T>()
595+
(mem::size_of::<AlignedHeader<H, T>>()-1) / mem::size_of::<T>() + 1
596596
}
597597

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

0 commit comments

Comments
 (0)