diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index e6c37b6ba598..a76c8997a106 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -1964,10 +1964,8 @@ impl str { /// Returns a string slice with the prefix removed. /// - /// If the string starts with the pattern `prefix`, returns - /// substring after the prefix, wrapped in `Some`. - /// Unlike `trim_start_matches`, this method removes the - /// prefix exactly once. + /// If the string starts with the pattern `prefix`, returns substring after the prefix, wrapped + /// in `Some`. Unlike `trim_start_matches`, this method removes the prefix exactly once. /// /// If the string does not start with `prefix`, returns `None`. /// @@ -1993,10 +1991,8 @@ impl str { /// Returns a string slice with the suffix removed. /// - /// If the string ends with the pattern `suffix`, returns the - /// substring before the suffix, wrapped in `Some`. - /// Unlike `trim_end_matches`, this method removes the - /// suffix exactly once. + /// If the string ends with the pattern `suffix`, returns the substring before the suffix, + /// wrapped in `Some`. Unlike `trim_end_matches`, this method removes the suffix exactly once. /// /// If the string does not end with `suffix`, returns `None`. ///