summaryrefslogtreecommitdiff
path: root/exercises/07_structs
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/07_structs')
-rw-r--r--exercises/07_structs/structs1.rs9
-rw-r--r--exercises/07_structs/structs2.rs9
-rw-r--r--exercises/07_structs/structs3.rs9
3 files changed, 12 insertions, 15 deletions
diff --git a/exercises/07_structs/structs1.rs b/exercises/07_structs/structs1.rs
index 2978121..62f1421 100644
--- a/exercises/07_structs/structs1.rs
+++ b/exercises/07_structs/structs1.rs
@@ -1,9 +1,4 @@
-// structs1.rs
-//
// Address all the TODOs to make the tests pass!
-//
-// Execute `rustlings hint structs1` or use the `hint` watch subcommand for a
-// hint.
struct ColorClassicStruct {
// TODO: Something goes here
@@ -14,6 +9,10 @@ struct ColorTupleStruct(/* TODO: Something goes here */);
#[derive(Debug)]
struct UnitLikeStruct;
+fn main() {
+ // You can optionally experiment here.
+}
+
#[cfg(test)]
mod tests {
use super::*;
diff --git a/exercises/07_structs/structs2.rs b/exercises/07_structs/structs2.rs
index a7a2dec..451dbe7 100644
--- a/exercises/07_structs/structs2.rs
+++ b/exercises/07_structs/structs2.rs
@@ -1,9 +1,4 @@
-// structs2.rs
-//
// Address all the TODOs to make the tests pass!
-//
-// Execute `rustlings hint structs2` or use the `hint` watch subcommand for a
-// hint.
#[derive(Debug)]
struct Order {
@@ -28,6 +23,10 @@ fn create_order_template() -> Order {
}
}
+fn main() {
+ // You can optionally experiment here.
+}
+
#[cfg(test)]
mod tests {
use super::*;
diff --git a/exercises/07_structs/structs3.rs b/exercises/07_structs/structs3.rs
index 9835b81..10adb48 100644
--- a/exercises/07_structs/structs3.rs
+++ b/exercises/07_structs/structs3.rs
@@ -1,11 +1,6 @@
-// structs3.rs
-//
// Structs contain data, but can also have logic. In this exercise we have
// defined the Package struct and we want to test some logic attached to it.
// Make the code compile and the tests pass!
-//
-// Execute `rustlings hint structs3` or use the `hint` watch subcommand for a
-// hint.
#[derive(Debug)]
struct Package {
@@ -38,6 +33,10 @@ impl Package {
}
}
+fn main() {
+ // You can optionally experiment here.
+}
+
#[cfg(test)]
mod tests {
use super::*;