Skip to content

Commit 0d8a0c5

Browse files
Rename LinesAnyMap to LinesMap
lines_any method was replaced with lines method, so it makes sense to rename this structure to match new name. Co-authored-by: Ian Jackson <[email protected]>
1 parent 2d46584 commit 0d8a0c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/core/src/str/iter.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use super::from_utf8_unchecked;
1313
use super::pattern::Pattern;
1414
use super::pattern::{DoubleEndedSearcher, ReverseSearcher, Searcher};
1515
use super::validations::{next_code_point, next_code_point_reverse};
16-
use super::LinesAnyMap;
16+
use super::LinesMap;
1717
use super::{BytesIsNotEmpty, UnsafeBytesToStr};
1818
use super::{CharEscapeDebugContinue, CharEscapeDefault, CharEscapeUnicode};
1919
use super::{IsAsciiWhitespace, IsNotEmpty, IsWhitespace};
@@ -1091,7 +1091,7 @@ generate_pattern_iterators! {
10911091
#[stable(feature = "rust1", since = "1.0.0")]
10921092
#[must_use = "iterators are lazy and do nothing unless consumed"]
10931093
#[derive(Clone, Debug)]
1094-
pub struct Lines<'a>(pub(super) Map<SplitTerminator<'a, char>, LinesAnyMap>);
1094+
pub struct Lines<'a>(pub(super) Map<SplitTerminator<'a, char>, LinesMap>);
10951095

10961096
#[stable(feature = "rust1", since = "1.0.0")]
10971097
impl<'a> Iterator for Lines<'a> {

library/core/src/str/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ impl str {
997997
#[stable(feature = "rust1", since = "1.0.0")]
998998
#[inline]
999999
pub fn lines(&self) -> Lines<'_> {
1000-
Lines(self.split_terminator('\n').map(LinesAnyMap))
1000+
Lines(self.split_terminator('\n').map(LinesMap))
10011001
}
10021002

10031003
/// An iterator over the lines of a string.
@@ -2590,7 +2590,7 @@ impl Default for &mut str {
25902590
impl_fn_for_zst! {
25912591
/// A nameable, cloneable fn type
25922592
#[derive(Clone)]
2593-
struct LinesAnyMap impl<'a> Fn = |line: &'a str| -> &'a str {
2593+
struct LinesMap impl<'a> Fn = |line: &'a str| -> &'a str {
25942594
let l = line.len();
25952595
if l > 0 && line.as_bytes()[l - 1] == b'\r' { &line[0 .. l - 1] }
25962596
else { line }

0 commit comments

Comments
 (0)