auto merge of #7177 : huonw/rust/unfold-fix, r=thestinger

This commit is contained in:
bors
2013-06-16 10:55:02 -07:00
2 changed files with 36 additions and 2 deletions

View File

@@ -816,8 +816,8 @@ impl<'self, A, St> UnfoldrIterator<'self, A, St> {
/// Creates a new iterator with the specified closure as the "iterator
/// function" and an initial state to eventually pass to the iterator
#[inline]
pub fn new(f: &'self fn(&mut St) -> Option<A>, initial_state: St)
-> UnfoldrIterator<'self, A, St> {
pub fn new<'a>(f: &'a fn(&mut St) -> Option<A>, initial_state: St)
-> UnfoldrIterator<'a, A, St> {
UnfoldrIterator {
f: f,
state: initial_state