From 8fc86855c2e074e25886d1d9c2ddc7e8a55e85eb Mon Sep 17 00:00:00 2001 From: David Bailey <davidbailey00@outlook.com> Date: Sun, 17 Jan 2021 14:44:31 +0000 Subject: [PATCH] Remove TODO comments --- exercises/option/option2.rs | 2 -- exercises/structs/structs1.rs | 2 -- exercises/structs/structs2.rs | 1 - exercises/traits/traits2.rs | 1 - 4 files changed, 6 deletions(-) diff --git a/exercises/option/option2.rs b/exercises/option/option2.rs index b002efb..301fb85 100644 --- a/exercises/option/option2.rs +++ b/exercises/option/option2.rs @@ -14,8 +14,6 @@ fn main() { optional_values_vec.push(Some(x)); } - // TODO: make this a while let statement - remember that vector.pop also adds another layer of Option<T> - // You can stack `Option<T>`'s into while let and if let while let Some(Some(value)) = optional_values_vec.pop() { println!("current value: {}", value); } diff --git a/exercises/structs/structs1.rs b/exercises/structs/structs1.rs index 7265f17..b188288 100644 --- a/exercises/structs/structs1.rs +++ b/exercises/structs/structs1.rs @@ -28,7 +28,6 @@ mod tests { #[test] fn tuple_structs() { - // TODO: Instantiate a tuple struct! let green = ColorTupleStruct(String::from("green"), String::from("#00FF00")); assert_eq!(green.0, "green"); @@ -37,7 +36,6 @@ mod tests { #[test] fn unit_structs() { - // TODO: Instantiate a unit struct! let unit_struct = UnitStruct; let message = format!("{:?}s are fun!", unit_struct); diff --git a/exercises/structs/structs2.rs b/exercises/structs/structs2.rs index 8002762..279ea09 100644 --- a/exercises/structs/structs2.rs +++ b/exercises/structs/structs2.rs @@ -31,7 +31,6 @@ mod tests { #[test] fn your_order() { let order_template = create_order_template(); - // TODO: Create your own order using the update syntax and template above! let your_order = Order { name: String::from("Hacker in Rust"), count: 1, diff --git a/exercises/traits/traits2.rs b/exercises/traits/traits2.rs index 8292776..5554d50 100644 --- a/exercises/traits/traits2.rs +++ b/exercises/traits/traits2.rs @@ -14,7 +14,6 @@ trait AppendBar { fn append_bar(self) -> Self; } -//TODO: Add your code here impl AppendBar for Vec<String> { fn append_bar(mut self) -> Self { self.push(String::from("Bar"));