From 4f7ff5d9c7b2d8b045194c1a9469d37e30257c4a Mon Sep 17 00:00:00 2001 From: Yang Wen Date: Fri, 4 Feb 2022 22:12:02 +0800 Subject: [PATCH] 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. --- exercises/structs/structs3.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/structs/structs3.rs b/exercises/structs/structs3.rs index 1a81531c..e84f2ebc 100644 --- a/exercises/structs/structs3.rs +++ b/exercises/structs/structs3.rs @@ -16,7 +16,7 @@ struct Package { impl Package { fn new(sender_country: String, recipient_country: String, weight_in_grams: i32) -> Package { if weight_in_grams <= 0 { - // Something goes here... + // panic statement goes here... } else { Package { sender_country,