mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-10 12:49:18 +00:00
test
This commit is contained in:
parent
eb3e9dabb6
commit
765740841f
@ -33,7 +33,7 @@ mod tests {
|
||||
#[test]
|
||||
fn tuple_structs() {
|
||||
// TODO: Instantiate a tuple struct!
|
||||
let green =(String::from("green"),String::from("#00FF00"));
|
||||
let green =(String::from("en"),String::from("#00FF00"));
|
||||
|
||||
assert_eq!(green.0, "green");
|
||||
assert_eq!(green.1, "#00FF00");
|
||||
|
||||
@ -17,6 +17,7 @@ impl Package {
|
||||
fn new(sender_country: String, recipient_country: String, weight_in_grams: i32) -> Package {
|
||||
if weight_in_grams <= 0 {
|
||||
// Something goes here...
|
||||
// panic!("Oh no")
|
||||
} else {
|
||||
return Package {
|
||||
sender_country,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user