Skip to content

Conversation

@jimblandy
Copy link
Contributor

In the discussion of returning closures, it seems like the example code got simplified, but only the later copies got fixed. The final working code has factory returning |x| x + num, but the earlier code has |x| vec.push(x).

The first form seemed to have more distracting characteristics, and the code wasn't right anyway, so I changed them to all use the second form, and updated the error messages.

r? @steveklabnik

@steveklabnik
Copy link
Contributor

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 10, 2015

📌 Commit 7d298d1 has been approved by steveklabnik

@steveklabnik
Copy link
Contributor

Thanks so much jim!

@jimblandy
Copy link
Contributor Author

Sure thing!

Manishearth added a commit to Manishearth/rust that referenced this pull request Jun 11, 2015
In the discussion of returning closures, it seems like the example code got simplified, but only the later copies got fixed. The final working code has `factory` returning `|x| x + num`, but the earlier code has `|x| vec.push(x)`.

The first form seemed to have more distracting characteristics, and the code wasn't right anyway, so I changed them to all use the second form, and updated the error messages.

r? @steveklabnik
bors added a commit that referenced this pull request Jun 11, 2015
@bors bors merged commit 7d298d1 into rust-lang:master Jun 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants