Skip to content

Commit a5e4133

Browse files
authored
Make primitive_types3 require at least 100 elements
Made the function panic if it's not long enough
1 parent 4d04aad commit a5e4133

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

exercises/primitive_types/primitive_types3.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ fn main() {
1414
println!("Wow, that's a big array!");
1515
} else {
1616
println!("Meh, I eat arrays like that for breakfast.");
17+
panic!("Array not big enough, more elements needed")
1718
}
1819
}

0 commit comments

Comments
 (0)