File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -594,9 +594,9 @@ impl OsString {
594594 /// The slice must be valid for the platform encoding (as described in
595595 /// [`OsStr::from_encoded_bytes_unchecked`]).
596596 ///
597- /// This bypasses the encoding-dependent surrogate joining, so `self` must
598- /// not end with a leading surrogate half and `other` must not start with
599- /// with a trailing surrogate half.
597+ /// This bypasses the encoding-dependent surrogate joining, so either
598+ /// `self` must not end with a leading surrogate half, or `other` must not
599+ /// start with a trailing surrogate half.
600600 #[ inline]
601601 pub ( crate ) unsafe fn extend_from_slice_unchecked ( & mut self , other : & [ u8 ] ) {
602602 // SAFETY: Guaranteed by caller.
Original file line number Diff line number Diff line change @@ -215,9 +215,9 @@ impl Buf {
215215 /// The slice must be valid for the platform encoding (as described in
216216 /// [`Slice::from_encoded_bytes_unchecked`]).
217217 ///
218- /// This bypasses the WTF-8 surrogate joining, so `self` must not end with a
219- /// leading surrogate half and `other` must not start with with a trailing
220- /// surrogate half.
218+ /// This bypasses the WTF-8 surrogate joining, so either `self` must not
219+ /// end with a leading surrogate half, or `other` must not start with a
220+ /// trailing surrogate half.
221221 #[ inline]
222222 pub unsafe fn extend_from_slice_unchecked ( & mut self , other : & [ u8 ] ) {
223223 self . inner . extend_from_slice ( other) ;
You can’t perform that action at this time.
0 commit comments