mirror of
https://github.com/openharmony/third_party_rust_encoding_rs.git
synced 2026-07-18 21:05:30 -04:00
Adjust bogus documentation.
This commit is contained in:
+3
-4
@@ -1738,10 +1738,9 @@ pub fn convert_latin1_to_utf16(src: &[u8], dst: &mut [u16]) {
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// Note that this function may write garbage beyond the number of bytes
|
||||
/// indicated by the return value, so using a `&mut str` interpreted as
|
||||
/// `&mut [u8]` as the destination is not safe. If you want to convert into
|
||||
/// a `&mut str`, use `convert_utf16_to_str()` instead of this function.
|
||||
/// If you want to convert into a `&mut str`, use
|
||||
/// `convert_utf16_to_str_partial()` instead of using this function
|
||||
/// together with the `unsafe` method `as_bytes_mut()` on `&mut str`.
|
||||
pub fn convert_latin1_to_utf8_partial(src: &[u8], dst: &mut [u8]) -> (usize, usize) {
|
||||
let src_len = src.len();
|
||||
let src_ptr = src.as_ptr();
|
||||
|
||||
Reference in New Issue
Block a user