Rollup merge of #78606 - autarch:patch-1, r=m-ou-se
Clarify handling of final line ending in str::lines() I found the description as it stands a bit confusing. I've added a bit more explanation to make it clear that a trailing line ending does not produce a final empty line.
This commit is contained in:
commit
0fdb371d5a
@ -842,7 +842,9 @@ impl str {
|
||||
/// Lines are ended with either a newline (`\n`) or a carriage return with
|
||||
/// a line feed (`\r\n`).
|
||||
///
|
||||
/// The final line ending is optional.
|
||||
/// The final line ending is optional. A string that ends with a final line
|
||||
/// ending will return the same lines as an otherwise identical string
|
||||
/// without a final line ending.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user