1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-22 18:30:33 +02:00

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.
This commit is contained in:
Nicole L 2025-05-21 17:44:43 -07:00 committed by GitHub
parent 738d5ad820
commit db47709e87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,7 @@ fn main() {
// This triggers an error at runtime.
// let other = cell.borrow();
// println!("{}", *other);
// println!("{}", other);
}
println!("{cell:?}");