mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03:00
Use todo!() instead of ???
This commit is contained in:
parent
cf9041c0e4
commit
4f71f74b44
|
@ -29,8 +29,8 @@ mod tests {
|
||||||
// TODO: This test should check if the rectangle has the size that we
|
// TODO: This test should check if the rectangle has the size that we
|
||||||
// pass to its constructor.
|
// pass to its constructor.
|
||||||
let rect = Rectangle::new(10, 20);
|
let rect = Rectangle::new(10, 20);
|
||||||
assert_eq!(???, 10); // Check width
|
assert_eq!(todo!(), 10); // Check width
|
||||||
assert_eq!(???, 20); // Check height
|
assert_eq!(todo!(), 20); // Check height
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This test should check if the program panics when we try to create
|
// 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"];
|
let my_fav_fruits = ["banana", "custard apple", "avocado", "peach", "raspberry"];
|
||||||
|
|
||||||
// TODO: Create an iterator over the array.
|
// 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(), 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(), 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(), 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