diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-01-09 00:29:20 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-09 00:29:20 +0900 |
| commit | 98a5c7dc044c7f201131670f87d24649fa6e3bbf (patch) | |
| tree | 3861b77de7bc74822c25e43e336c690617375965 /src | |
| parent | b6874610730a6483ef1278e57c238fa2f8d2ef91 (diff) | |
| parent | 48add5453b8757ac8757cfc2c8ad1197d4d258b1 (diff) | |
| download | rust-98a5c7dc044c7f201131670f87d24649fa6e3bbf.tar.gz rust-98a5c7dc044c7f201131670f87d24649fa6e3bbf.zip | |
Rollup merge of #67985 - dtolnay:cstr, r=Mark-Simulacrum
Remove insignificant notes from CStr documentation The to_str and to_string_lossy methods contain a note about the behavior possibly changing in the future. But those notes are referring to a distinction that is not observable in the API. Whether or not the UTF-8 check knows the string length ahead of time, these methods require linear time.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index d2ee65f0a74..700e015b08e 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -1187,11 +1187,6 @@ impl CStr { /// function will return the corresponding [`&str`] slice. Otherwise, /// it will return an error with details of where UTF-8 validation failed. /// - /// > **Note**: This method is currently implemented to check for validity - /// > after a constant-time cast, but it is planned to alter its definition - /// > in the future to perform the length calculation in addition to the - /// > UTF-8 check whenever this method is called. - /// /// [`&str`]: ../primitive.str.html /// /// # Examples @@ -1220,11 +1215,6 @@ impl CStr { /// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD] and return a /// [`Cow`]`::`[`Owned`]`(`[`String`]`)` with the result. /// - /// > **Note**: This method is currently implemented to check for validity - /// > after a constant-time cast, but it is planned to alter its definition - /// > in the future to perform the length calculation in addition to the - /// > UTF-8 check whenever this method is called. - /// /// [`Cow`]: ../borrow/enum.Cow.html /// [`Borrowed`]: ../borrow/enum.Cow.html#variant.Borrowed /// [`Owned`]: ../borrow/enum.Cow.html#variant.Owned |
