Skip to content

Commit

Permalink
Update tutorial.md
Browse files Browse the repository at this point in the history
Change fn() -> &fn().
  • Loading branch information
luqmana committed Apr 1, 2013
1 parent 4c58903 commit d617030
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1539,9 +1539,9 @@ for spawning [tasks][tasks].

Rust closures have a convenient subtyping property: you can pass any kind of
closure (as long as the arguments and return types match) to functions
that expect a `fn()`. Thus, when writing a higher-order function that
that expect a `&fn()`. Thus, when writing a higher-order function that
only calls its function argument, and does nothing else with it, you
should almost always declare the type of that argument as `fn()`. That way,
should almost always declare the type of that argument as `&fn()`. That way,
callers may pass any kind of closure.

~~~~
Expand Down

5 comments on commit d617030

@bors
Copy link
Contributor

@bors bors commented on d617030 Apr 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from thestinger
at luqmana@d617030

@bors
Copy link
Contributor

@bors bors commented on d617030 Apr 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging luqmana/rust/incoming = d617030 into auto

@bors
Copy link
Contributor

@bors bors commented on d617030 Apr 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

luqmana/rust/incoming = d617030 merged ok, testing candidate = be79258

@bors
Copy link
Contributor

@bors bors commented on d617030 Apr 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on d617030 Apr 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = be79258

Please sign in to comment.