mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-06 00:44:23 +02:00
Remove two unnecessary muts from the Rc example (#1603)
Neither `a` nor `b` need to be mutable in this example. Hence, I removed them.
This commit is contained in:
parent
a369e108fc
commit
568e78a5b0
@ -11,8 +11,8 @@ to the same data from multiple places:
|
||||
use std::rc::Rc;
|
||||
|
||||
fn main() {
|
||||
let mut a = Rc::new(10);
|
||||
let mut b = Rc::clone(&a);
|
||||
let a = Rc::new(10);
|
||||
let b = Rc::clone(&a);
|
||||
|
||||
println!("a: {a}");
|
||||
println!("b: {b}");
|
||||
|
Loading…
x
Reference in New Issue
Block a user