tokio-rs / bytes

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

Bytes::split_to - check fast path first #689

Closed braddunbar closed 5 months ago

braddunbar commented 5 months ago

If at == self.len() then we already know at <= self.len(). If at == 0, it can't be greater than self.len().