1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-17 14:47:35 +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:
Martin Huschenbett
2023-12-20 16:47:35 +01:00
committed by GitHub
parent a369e108fc
commit 568e78a5b0

View File

@ -11,8 +11,8 @@ to the same data from multiple places:
use std::rc::Rc; use std::rc::Rc;
fn main() { fn main() {
let mut a = Rc::new(10); let a = Rc::new(10);
let mut b = Rc::clone(&a); let b = Rc::clone(&a);
println!("a: {a}"); println!("a: {a}");
println!("b: {b}"); println!("b: {b}");