tokio-rs / bytes

Utilities for working with bytes
MIT License
1.86k stars 278 forks source link

Truncate tweaks #694

Closed braddunbar closed 4 months ago

braddunbar commented 4 months ago

This is a quick tweak to BytesMut::truncate to avoid calling BytesMut::set_len unnecessarily and to explicitly state assumptions of safety.