Skip to content

Commit 0ae1df7

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 f03ce30 commit 0ae1df7

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
@@ -995,7 +995,7 @@ impl str {
995995
#[stable(feature = "rust1", since = "1.0.0")]
996996
#[inline]
997997
pub fn lines(&self) -> Lines<'_> {
998-
Lines(self.split_terminator('\n').map(LinesAnyMap))
998+
Lines(self.split_terminator('\n').map(LinesMap))
999999
}
10001000

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

0 commit comments

Comments
 (0)