Skip to content

Commit

Permalink
Improve comment on capacity calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sytten committed May 1, 2024
1 parent 675fcb4 commit fdad89c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bytes_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1746,8 +1746,8 @@ unsafe fn shared_v_to_mut(data: &AtomicPtr<()>, ptr: *const u8, len: usize) -> B
if (*shared).is_unique() {
let shared = &mut *shared;

// The capacity of the buffer is always the original capacity
// of the buffer minus the offset from the start of that buffer.
// The capacity is always the original capacity of the buffer
// minus the offset from the start of the buffer
let v = &mut shared.vec;
let v_capacity = v.capacity();
let v_ptr = v.as_mut_ptr();
Expand Down

0 comments on commit fdad89c

Please sign in to comment.