mirror of
https://github.com/notohh/rustlings.git
synced 2024-10-30 08:49:12 -04:00
Use todo!() instead of ???
This commit is contained in:
parent
cf9041c0e4
commit
4f71f74b44
2 changed files with 6 additions and 6 deletions
|
@ -29,8 +29,8 @@ mod tests {
|
|||
// TODO: This test should check if the rectangle has the size that we
|
||||
// pass to its constructor.
|
||||
let rect = Rectangle::new(10, 20);
|
||||
assert_eq!(???, 10); // Check width
|
||||
assert_eq!(???, 20); // Check height
|
||||
assert_eq!(todo!(), 10); // Check width
|
||||
assert_eq!(todo!(), 20); // Check height
|
||||
}
|
||||
|
||||
// TODO: This test should check if the program panics when we try to create
|
||||
|
|
|
@ -13,13 +13,13 @@ mod tests {
|
|||
let my_fav_fruits = ["banana", "custard apple", "avocado", "peach", "raspberry"];
|
||||
|
||||
// TODO: Create an iterator over the array.
|
||||
let mut fav_fruits_iterator = ???;
|
||||
let mut fav_fruits_iterator = todo!();
|
||||
|
||||
assert_eq!(fav_fruits_iterator.next(), Some(&"banana"));
|
||||
assert_eq!(fav_fruits_iterator.next(), ???); // TODO: Replace `???`
|
||||
assert_eq!(fav_fruits_iterator.next(), todo!()); // TODO: Replace `todo!()`
|
||||
assert_eq!(fav_fruits_iterator.next(), Some(&"avocado"));
|
||||
assert_eq!(fav_fruits_iterator.next(), ???); // TODO: Replace `???`
|
||||
assert_eq!(fav_fruits_iterator.next(), todo!()); // TODO: Replace `todo!()`
|
||||
assert_eq!(fav_fruits_iterator.next(), Some(&"raspberry"));
|
||||
assert_eq!(fav_fruits_iterator.next(), ???); // TODO: Replace `???`
|
||||
assert_eq!(fav_fruits_iterator.next(), todo!()); // TODO: Replace `todo!()`
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue