summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exercises/structs/structs1.rs11
-rw-r--r--info.toml1
2 files changed, 7 insertions, 5 deletions
diff --git a/exercises/structs/structs1.rs b/exercises/structs/structs1.rs
index 6d0b2f4..1632b68 100644
--- a/exercises/structs/structs1.rs
+++ b/exercises/structs/structs1.rs
@@ -1,5 +1,6 @@
// structs1.rs
// Address all the TODOs to make the tests pass!
+// Execute `rustlings hint structs1` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
@@ -21,8 +22,9 @@ mod tests {
// TODO: Instantiate a classic c struct!
// let green =
- assert_eq!(green.name, "green");
- assert_eq!(green.hex, "#00FF00");
+ assert_eq!(green.red, 0);
+ assert_eq!(green.green, 255);
+ assert_eq!(green.blue, 0);
}
#[test]
@@ -30,8 +32,9 @@ mod tests {
// TODO: Instantiate a tuple struct!
// let green =
- assert_eq!(green.0, "green");
- assert_eq!(green.1, "#00FF00");
+ assert_eq!(green.0, 0);
+ assert_eq!(green.1, 255);
+ assert_eq!(green.2, 0);
}
#[test]
diff --git a/info.toml b/info.toml
index 899d4c1..2dc49a3 100644
--- a/info.toml
+++ b/info.toml
@@ -357,7 +357,6 @@ Can you figure out how?
Another hint: it has to do with the `&` character."""
-
# STRUCTS
[[exercises]]