mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-05-23 22:40:20 +02:00
Remove TODO from 2 solutions
This commit is contained in:
parent
7c0d269279
commit
d2abc359cc
@ -4,8 +4,6 @@ fn main() {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
// TODO: Fix the compiler errors only by reordering the lines in the test.
|
|
||||||
// Don't add, change or remove any line.
|
|
||||||
#[test]
|
#[test]
|
||||||
fn move_semantics4() {
|
fn move_semantics4() {
|
||||||
let mut x = Vec::new();
|
let mut x = Vec::new();
|
||||||
|
@ -63,12 +63,10 @@ mod tests {
|
|||||||
println!("reference count = {}", Rc::strong_count(&sun)); // 7 references
|
println!("reference count = {}", Rc::strong_count(&sun)); // 7 references
|
||||||
saturn.details();
|
saturn.details();
|
||||||
|
|
||||||
// TODO
|
|
||||||
let uranus = Planet::Uranus(Rc::clone(&sun));
|
let uranus = Planet::Uranus(Rc::clone(&sun));
|
||||||
println!("reference count = {}", Rc::strong_count(&sun)); // 8 references
|
println!("reference count = {}", Rc::strong_count(&sun)); // 8 references
|
||||||
uranus.details();
|
uranus.details();
|
||||||
|
|
||||||
// TODO
|
|
||||||
let neptune = Planet::Neptune(Rc::clone(&sun));
|
let neptune = Planet::Neptune(Rc::clone(&sun));
|
||||||
println!("reference count = {}", Rc::strong_count(&sun)); // 9 references
|
println!("reference count = {}", Rc::strong_count(&sun)); // 9 references
|
||||||
neptune.details();
|
neptune.details();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user