Skip to content

Commit fdad89c

Browse files
committed
Improve comment on capacity calculation
1 parent 675fcb4 commit fdad89c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bytes_mut.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,8 +1746,8 @@ unsafe fn shared_v_to_mut(data: &AtomicPtr<()>, ptr: *const u8, len: usize) -> B
17461746
if (*shared).is_unique() {
17471747
let shared = &mut *shared;
17481748

1749-
// The capacity of the buffer is always the original capacity
1750-
// of the buffer minus the offset from the start of that buffer.
1749+
// The capacity is always the original capacity of the buffer
1750+
// minus the offset from the start of the buffer
17511751
let v = &mut shared.vec;
17521752
let v_capacity = v.capacity();
17531753
let v_ptr = v.as_mut_ptr();

0 commit comments

Comments
 (0)