Skip to content

Commit

Permalink
this '*' is unnecessary, and reduces readability
Browse files Browse the repository at this point in the history
  • Loading branch information
zancas committed Jul 19, 2020
1 parent 4e6ea83 commit 0d73e2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/closure.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let mut s = String::from("foo");
let t = String::from("bar");

f(|| {
s += &*t;
s += &t;
s
});
// Prints "foobar".
Expand Down

0 comments on commit 0d73e2b

Please sign in to comment.