Skip to content

Commit e1b0457

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163252 b: refs/heads/snap-stage3 c: e66ba15 h: refs/heads/master v: v3
1 parent cc0df05 commit e1b0457

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 801ae1333c05ab641ff08c14fee776c08f42cff8
4+
refs/heads/snap-stage3: e66ba157643420c6a46f07c68e9b817a66a64b4f
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libunicode/u_str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ use tables::grapheme::GraphemeCat;
2929

3030
/// An iterator over the words of a string, separated by a sequence of whitespace
3131
/// FIXME: This should be opaque
32-
pub type Words<'a> =
33-
Filter<'a, &'a str, CharSplits<'a, |char|:'a -> bool>>;
32+
pub type Words<'a> = Filter<&'a str, CharSplits<'a, |char|:'a -> bool>, fn(&&str) -> bool>;
3433

3534
/// Methods for Unicode string slices
3635
pub trait UnicodeStrPrelude for Sized? {
@@ -143,8 +142,9 @@ impl UnicodeStrPrelude for str {
143142

144143
#[inline]
145144
fn words(&self) -> Words {
145+
fn is_not_empty(s: &&str) -> bool { !s.is_empty() }
146146
let f = |c: char| c.is_whitespace();
147-
self.split(f).filter(|s| !s.is_empty())
147+
self.split(f).filter(is_not_empty)
148148
}
149149

150150
#[inline]

0 commit comments

Comments
 (0)