Skip to content

Commit 9475c25

Browse files
committed
---
yaml --- r: 79793 b: refs/heads/try c: 4c2b480 h: refs/heads/master i: 79791: c6871d0 v: v3
1 parent d119417 commit 9475c25

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: ba9fa89bfb4aae53db93e9ecac31807af96356fc
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 54ae2800ffb30513f89ce13d27ac3c8d095d98ac
5-
refs/heads/try: b3d50fc2c015cc8a335855b82ab458a15a7413d9
5+
refs/heads/try: 4c2b480aae2abb87e617076ee3f672f5c851d7d0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libstd/iterator.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,26 +1672,26 @@ for Inspect<'self, A, T> {
16721672
}
16731673

16741674
/// An iterator which just modifies the contained state throughout iteration.
1675-
pub struct Unfoldr<'self, A, St> {
1675+
pub struct Unfold<'self, A, St> {
16761676
priv f: &'self fn(&mut St) -> Option<A>,
16771677
/// Internal state that will be yielded on the next iteration
16781678
state: St
16791679
}
16801680

1681-
impl<'self, A, St> Unfoldr<'self, A, St> {
1681+
impl<'self, A, St> Unfold<'self, A, St> {
16821682
/// Creates a new iterator with the specified closure as the "iterator
16831683
/// function" and an initial state to eventually pass to the iterator
16841684
#[inline]
16851685
pub fn new<'a>(initial_state: St, f: &'a fn(&mut St) -> Option<A>)
1686-
-> Unfoldr<'a, A, St> {
1687-
Unfoldr {
1686+
-> Unfold<'a, A, St> {
1687+
Unfold {
16881688
f: f,
16891689
state: initial_state
16901690
}
16911691
}
16921692
}
16931693

1694-
impl<'self, A, St> Iterator<A> for Unfoldr<'self, A, St> {
1694+
impl<'self, A, St> Iterator<A> for Unfold<'self, A, St> {
16951695
#[inline]
16961696
fn next(&mut self) -> Option<A> {
16971697
(self.f)(&mut self.state)
@@ -2213,7 +2213,7 @@ mod tests {
22132213
}
22142214
}
22152215

2216-
let mut it = Unfoldr::new(0, count);
2216+
let mut it = Unfold::new(0, count);
22172217
let mut i = 0;
22182218
for counted in it {
22192219
assert_eq!(counted, i);

branches/try/src/test/run-pass/unfoldr-cross-crate.rs renamed to branches/try/src/test/run-pass/unfold-cross-crate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use std::iterator::*;
1212

13-
// Unfoldr had a bug with 'self that mean it didn't work
13+
// Unfold had a bug with 'self that mean it didn't work
1414
// cross-crate
1515

1616
fn main() {
@@ -24,7 +24,7 @@ fn main() {
2424
}
2525
}
2626

27-
let mut it = Unfoldr::new(0, count);
27+
let mut it = Unfold::new(0, count);
2828
let mut i = 0;
2929
for counted in it {
3030
assert_eq!(counted, i);

0 commit comments

Comments
 (0)