Skip to content

Commit 4f7ff5d

Browse files
authored
fix(structs3): Add a hint for panic (#608)
as a totally newbie to Rust, I don't know panic statement from https://doc.rust-lang.org/book/ and rustlings in the beginning. After a hard searching of [should_panic], then I figure out panic statement. So it's helpful to tell the learner that write a panic statement here.
1 parent cbcde34 commit 4f7ff5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/structs/structs3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct Package {
1616
impl Package {
1717
fn new(sender_country: String, recipient_country: String, weight_in_grams: i32) -> Package {
1818
if weight_in_grams <= 0 {
19-
// Something goes here...
19+
// panic statement goes here...
2020
} else {
2121
Package {
2222
sender_country,

0 commit comments

Comments
 (0)