about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2020-01-07 12:01:39 -0800
committerDavid Tolnay <dtolnay@gmail.com>2020-01-07 12:03:28 -0800
commit48add5453b8757ac8757cfc2c8ad1197d4d258b1 (patch)
tree24a0a9648aaf520b451711b9f7141eeac5d1d04b /src/libstd
parent56446fef49d73212f63ea7aa0680d5d602f19b9a (diff)
downloadrust-48add5453b8757ac8757cfc2c8ad1197d4d258b1.tar.gz
rust-48add5453b8757ac8757cfc2c8ad1197d4d258b1.zip
Remove insignificant notes from CStr documentation
These notes are about a distinction that is not going to be 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/libstd')
-rw-r--r--src/libstd/ffi/c_str.rs10
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