Skip to content

Commit

Permalink
Merge pull request #1331 from ScriptDevil/patch-1
Browse files Browse the repository at this point in the history
Capture example should use String
  • Loading branch information
marioidival authored May 13, 2020
2 parents e7b0f62 + 634e6f6 commit 87b589c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fn/closures/capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ required.
fn main() {
use std::mem;
let color = "green";
let color = String::from("green");
// A closure to print `color` which immediately borrows (`&`) `color` and
// stores the borrow and closure in the `print` variable. It will remain
Expand Down

0 comments on commit 87b589c

Please sign in to comment.