Skip to content

Commit a71bc62

Browse files
author
Yvan Sraka
committed
Add errors to exercises that compile without user changes
1 parent 4b0b709 commit a71bc62

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

exercises/move_semantics/move_semantics4.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ fn main() {
1616

1717
}
1818

19-
fn fill_vec(vec: Vec<i32>) -> Vec<i32> {
19+
// `fill_vec()` no longer take `vec: Vec<i32>` as argument
20+
fn fill_vec() -> Vec<i32> {
2021
let mut vec = vec;
2122

2223
vec.push(22);

exercises/test2.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ mod tests {
1717

1818
#[test]
1919
fn returns_twice_of_positive_numbers() {
20-
assert_eq!(4, 4);
20+
assert_eq!(times_two(4), ???);
21+
}
22+
23+
#[test]
24+
fn returns_twice_of_negative_numbers() {
25+
// TODO write an assert for `times_two(-4)`
2126
}
2227
}

0 commit comments

Comments
 (0)