tokio-rs / bytes

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

Offset from #705

Closed braddunbar closed 3 months ago

braddunbar commented 4 months ago

In #695, @Sytten added a separate version of offset_from for *const u8 (thanks @Sytten). After some digging, I found that we can use the new one for both cases. Further, there are several additional places we can/should be using offset_from instead of subtracting directly.