summaryrefslogtreecommitdiff
path: root/exercises/smart_pointers
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2023-08-27 01:06:01 +0200
committermo8it <mo8it@proton.me>2023-08-27 01:06:01 +0200
commit193b600382ead22a24d2c26ca3a9117e7ad18be8 (patch)
tree7c72396c4bfe47697b74fc8fb05067f7c54ced90 /exercises/smart_pointers
parent16936d95d13df800f06c7af22069b5daf0c672e4 (diff)
Convert other exercises that have assertions to test mode
Diffstat (limited to 'exercises/smart_pointers')
-rw-r--r--exercises/smart_pointers/rc1.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/exercises/smart_pointers/rc1.rs b/exercises/smart_pointers/rc1.rs
index ad3f1ce..1b90346 100644
--- a/exercises/smart_pointers/rc1.rs
+++ b/exercises/smart_pointers/rc1.rs
@@ -35,6 +35,7 @@ impl Planet {
}
}
+#[test]
fn main() {
let sun = Rc::new(Sun {});
println!("reference count = {}", Rc::strong_count(&sun)); // 1 reference