mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-07 03:09:19 +00:00
Remove TODO comments
This commit is contained in:
parent
b66d86cce3
commit
8fc86855c2
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user