diff options
| author | teor <teor@riseup.net> | 2025-05-12 18:49:36 +1000 |
|---|---|---|
| committer | teor <teor@riseup.net> | 2025-05-15 07:58:30 +1000 |
| commit | 8f0522dc811b7132c3bd2b2bc5c134a869824cf3 (patch) | |
| tree | ef0d7d88e5e49353991bb285dcf6ba1babb217e6 /library/std/src/sys/os_str | |
| parent | ac9ac0e0f36dcd7f8a8f0405cd003585fe4e4426 (diff) | |
Fix confusing WTF surrogate safety docs
Diffstat (limited to 'library/std/src/sys/os_str')
| -rw-r--r-- | library/std/src/sys/os_str/wtf8.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sys/os_str/wtf8.rs b/library/std/src/sys/os_str/wtf8.rs index 5174ea65d0c..892bd2e3de6 100644 --- a/library/std/src/sys/os_str/wtf8.rs +++ b/library/std/src/sys/os_str/wtf8.rs @@ -215,9 +215,9 @@ impl Buf { /// The slice must be valid for the platform encoding (as described in /// [`Slice::from_encoded_bytes_unchecked`]). /// - /// This bypasses the WTF-8 surrogate joining, so `self` must not end with a - /// leading surrogate half and `other` must not start with with a trailing - /// surrogate half. + /// This bypasses the WTF-8 surrogate joining, so either `self` must not + /// end with a leading surrogate half, or `other` must not start with a + /// trailing surrogate half. #[inline] pub unsafe fn extend_from_slice_unchecked(&mut self, other: &[u8]) { self.inner.extend_from_slice(other); |
