This commit is contained in:
Clément Bœsch 2025-03-17 18:38:28 +01:00 committed by GitHub
commit ca6de8a666
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 4 deletions
solutions
06_move_semantics
19_smart_pointers

View file

@ -4,8 +4,6 @@ fn main() {
#[cfg(test)]
mod tests {
// TODO: Fix the compiler errors only by reordering the lines in the test.
// Don't add, change or remove any line.
#[test]
fn move_semantics4() {
let mut x = Vec::new();

View file

@ -63,12 +63,10 @@ mod tests {
println!("reference count = {}", Rc::strong_count(&sun)); // 7 references
saturn.details();
// TODO
let uranus = Planet::Uranus(Rc::clone(&sun));
println!("reference count = {}", Rc::strong_count(&sun)); // 8 references
uranus.details();
// TODO
let neptune = Planet::Neptune(Rc::clone(&sun));
println!("reference count = {}", Rc::strong_count(&sun)); // 9 references
neptune.details();