Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use checked_sub * return when additional == 0 * move safe operation out of unsafe block * use spare_capacity_mut instead of chunk_mut We don't need to check capacity because it's already been reserved above. * Add safety comments * refactor to use guard clauses This would be better written with let-else, but we won't get that until `MSRV >= 1.65.x`. * use if-let instead of unwrap * reduce scope of unsafe blocks Co-authored-by: Alice Ryhl <[email protected]> --------- Co-authored-by: Alice Ryhl <[email protected]>
- Loading branch information