Rollup merge of #130658 - EqualMa:patch-1, r=scottmcm

Fix docs of compare_bytes

The docs of `compare_bytes`. The return value is positive if <del>`right`</del> `left` is greater
This commit is contained in:
Guillaume Gomez 2024-09-22 19:19:14 +02:00 committed by GitHub
commit cbf23960ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2733,7 +2733,7 @@ pub const fn ptr_guaranteed_cmp<T>(ptr: *const T, other: *const T) -> u8 {
/// Lexicographically compare `[left, left + bytes)` and `[right, right + bytes)`
/// as unsigned bytes, returning negative if `left` is less, zero if all the
/// bytes match, or positive if `right` is greater.
/// bytes match, or positive if `left` is greater.
///
/// This underlies things like `<[u8]>::cmp`, and will usually lower to `memcmp`.
///