Skip to content

Commit e7ce868

Browse files
zackmdavismatthiaskrgr
andcommittedDec 26, 2018
Update src/libcore/str/mod.rs, tweak must_use message
trimmed string is returned as a slice instead of a new allocation Co-Authored-By: matthiaskrgr <[email protected]>
1 parent 809a1a8 commit e7ce868

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/libcore/str/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3544,7 +3544,7 @@ impl str {
35443544
///
35453545
/// assert_eq!("Hello\tworld", s.trim());
35463546
/// ```
3547-
#[must_use = "this returns the trimmed string as a new allocation, \
3547+
#[must_use = "this returns the trimmed string as a slice, \
35483548
without modifying the original"]
35493549
#[stable(feature = "rust1", since = "1.0.0")]
35503550
pub fn trim(&self) -> &str {

0 commit comments

Comments
 (0)
Please sign in to comment.