summaryrefslogtreecommitdiff
path: root/exercises/structs
diff options
context:
space:
mode:
authorYang Wen <kevin.wenyang@gmail.com>2022-02-04 22:12:02 +0800
committerGitHub <noreply@github.com>2022-02-04 15:12:02 +0100
commit4f7ff5d9c7b2d8b045194c1a9469d37e30257c4a (patch)
treef8fdc8375f4eae75296b4f17d5719c6aa72b83d1 /exercises/structs
parentcbcde345409c3e550112e449242848eaa3391bb6 (diff)
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.
Diffstat (limited to 'exercises/structs')
-rw-r--r--exercises/structs/structs3.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/structs/structs3.rs b/exercises/structs/structs3.rs
index 1a81531..e84f2eb 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,