Skip to content

Commit 554d5cf

Browse files
committed
Slight renamings
1 parent 8b662b6 commit 554d5cf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/stream/successor.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::task::{Context, Poll};
1212
///
1313
/// [`successor`]: fn.successor.html
1414
#[derive(Debug)]
15-
pub struct Successor<F, Fut, T>
15+
pub struct Successors<F, Fut, T>
1616
where
1717
Fut: Future<Output = T>,
1818
{
@@ -22,7 +22,7 @@ where
2222
_marker: PhantomData<Fut>,
2323
}
2424

25-
/// Creates a new stream where to produce each new element a clousre is called with the previous
25+
/// Creates a new stream where to produce each new element a closure is called with the previous
2626
/// value.
2727
///
2828
/// #Examples
@@ -33,7 +33,7 @@ where
3333
/// use async_std::prelude::*;
3434
/// use async_std::stream;
3535
///
36-
/// let s = stream::successor(22, |val| {
36+
/// let s = stream::successors(22, |val| {
3737
/// async move {
3838
/// val + 1
3939
/// }
@@ -47,21 +47,21 @@ where
4747
/// # }) }
4848
///
4949
/// ```
50-
pub fn successor<F, Fut, T>(start: T, func: F) -> Successor<F, Fut, T>
50+
pub fn successors<F, Fut, T>(start: T, func: F) -> Successors<F, Fut, T>
5151
where
5252
F: FnMut(T) -> Fut,
5353
Fut: Future<Output = T>,
5454
T: Copy,
5555
{
56-
Successor {
56+
Successors {
5757
successor: func,
5858
future: None,
5959
next: start,
6060
_marker: PhantomData,
6161
}
6262
}
6363

64-
impl<F, Fut, T> Successor<F, Fut, T>
64+
impl<F, Fut, T> Successors<F, Fut, T>
6565
where
6666
F: FnMut(T) -> Fut,
6767
Fut: Future<Output = T>,
@@ -72,7 +72,7 @@ where
7272
pin_utils::unsafe_pinned!(future: Option<Fut>);
7373
}
7474

75-
impl<F, Fut, T> Stream for Successor<F, Fut, T>
75+
impl<F, Fut, T> Stream for Successors<F, Fut, T>
7676
where
7777
Fut: Future<Output = T>,
7878
F: FnMut(T) -> Fut,

0 commit comments

Comments
 (0)