Skip to content

Commit db47709

Browse files
authored
Remove unnecessary deref operation in refcell.md (#2754)
This is another place where we were explicitly doing a deref in a situation where it's not necessary, so I think removing it makes the code a bit more idiomatic and readable.
1 parent 738d5ad commit db47709

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/borrowing/interior-mutability/refcell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323
2424
// This triggers an error at runtime.
2525
// let other = cell.borrow();
26-
// println!("{}", *other);
26+
// println!("{}", other);
2727
}
2828
2929
println!("{cell:?}");

0 commit comments

Comments
 (0)