Rollup merge of #114365 - tshepang:patch-6, r=Mark-Simulacrum

str.rs: remove "Basic usage" text

Only one example is given
This commit is contained in:
Matthias Krüger 2023-08-07 05:29:12 +02:00 committed by GitHub
commit f5df519fe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,8 +223,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let s = "this is a string";
/// let boxed_str = s.to_owned().into_boxed_str();
@ -487,8 +485,6 @@ pub fn to_uppercase(&self) -> String {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let string = String::from("birthday gift");
/// let boxed_str = string.clone().into_boxed_str();
@ -602,8 +598,6 @@ pub fn to_ascii_lowercase(&self) -> String {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let smile_utf8 = Box::new([226, 152, 186]);
/// let smile = unsafe { std::str::from_boxed_utf8_unchecked(smile_utf8) };