about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonrad Borowski <konrad@borowski.pw>2022-08-09 07:07:29 +0000
committerKonrad Borowski <konrad@borowski.pw>2022-10-06 16:04:48 +0000
commit0d8a0c56fee71dac218eb949817669ab8bb00c5e (patch)
treee04bd2b8f3d64b8a0fe6880bca2ff947481f0274
parent2d46584fae1acc74566bf49fce976fe509a38f5f (diff)
downloadrust-0d8a0c56fee71dac218eb949817669ab8bb00c5e.tar.gz
rust-0d8a0c56fee71dac218eb949817669ab8bb00c5e.zip
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 <ijackson@chiark.greenend.org.uk>
-rw-r--r--library/core/src/str/iter.rs4
-rw-r--r--library/core/src/str/mod.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/str/iter.rs b/library/core/src/str/iter.rs
index 24083ee6af4..660a3b091b3 100644
--- a/library/core/src/str/iter.rs
+++ b/library/core/src/str/iter.rs
@@ -13,7 +13,7 @@ use super::from_utf8_unchecked;
 use super::pattern::Pattern;
 use super::pattern::{DoubleEndedSearcher, ReverseSearcher, Searcher};
 use super::validations::{next_code_point, next_code_point_reverse};
-use super::LinesAnyMap;
+use super::LinesMap;
 use super::{BytesIsNotEmpty, UnsafeBytesToStr};
 use super::{CharEscapeDebugContinue, CharEscapeDefault, CharEscapeUnicode};
 use super::{IsAsciiWhitespace, IsNotEmpty, IsWhitespace};
@@ -1091,7 +1091,7 @@ generate_pattern_iterators! {
 #[stable(feature = "rust1", since = "1.0.0")]
 #[must_use = "iterators are lazy and do nothing unless consumed"]
 #[derive(Clone, Debug)]
-pub struct Lines<'a>(pub(super) Map<SplitTerminator<'a, char>, LinesAnyMap>);
+pub struct Lines<'a>(pub(super) Map<SplitTerminator<'a, char>, LinesMap>);
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a> Iterator for Lines<'a> {
diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs
index fbc0fc397a5..434c1598ee4 100644
--- a/library/core/src/str/mod.rs
+++ b/library/core/src/str/mod.rs
@@ -997,7 +997,7 @@ impl str {
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
     pub fn lines(&self) -> Lines<'_> {
-        Lines(self.split_terminator('\n').map(LinesAnyMap))
+        Lines(self.split_terminator('\n').map(LinesMap))
     }
 
     /// An iterator over the lines of a string.
@@ -2590,7 +2590,7 @@ impl Default for &mut str {
 impl_fn_for_zst! {
     /// A nameable, cloneable fn type
     #[derive(Clone)]
-    struct LinesAnyMap impl<'a> Fn = |line: &'a str| -> &'a str {
+    struct LinesMap impl<'a> Fn = |line: &'a str| -> &'a str {
         let l = line.len();
         if l > 0 && line.as_bytes()[l - 1] == b'\r' { &line[0 .. l - 1] }
         else { line }