summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormokou <mokou@fastmail.com>2022-07-14 12:00:46 +0200
committermokou <mokou@fastmail.com>2022-07-14 12:00:46 +0200
commit4dffa0d10df61748b0098ad4428848e6f3e90bff (patch)
tree2fd7696724ad9d7fb8ed56021c89e335556156da
parent19bec503998c3c5618254015bada63b44a713f0e (diff)
fix(structs1): rename to unit-like struct
-rw-r--r--exercises/structs/structs1.rs10
-rw-r--r--info.toml2
2 files changed, 6 insertions, 6 deletions
diff --git a/exercises/structs/structs1.rs b/exercises/structs/structs1.rs
index 1632b68..0d91c46 100644
--- a/exercises/structs/structs1.rs
+++ b/exercises/structs/structs1.rs
@@ -11,7 +11,7 @@ struct ColorClassicStruct {
struct ColorTupleStruct(/* TODO: Something goes here */);
#[derive(Debug)]
-struct UnitStruct;
+struct UnitLikeStruct;
#[cfg(test)]
mod tests {
@@ -39,10 +39,10 @@ mod tests {
#[test]
fn unit_structs() {
- // TODO: Instantiate a unit struct!
- // let unit_struct =
- let message = format!("{:?}s are fun!", unit_struct);
+ // TODO: Instantiate a unit-like struct!
+ // let unit_like_struct =
+ let message = format!("{:?}s are fun!", unit_like_struct);
- assert_eq!(message, "UnitStructs are fun!");
+ assert_eq!(message, "UnitLikeStructs are fun!");
}
}
diff --git a/info.toml b/info.toml
index 2dc49a3..357a25c 100644
--- a/info.toml
+++ b/info.toml
@@ -367,7 +367,7 @@ hint = """
Rust has more than one type of struct. Three actually, all variants are used to package related data together.
There are normal (or classic) structs. These are named collections of related data stored in fields.
Tuple structs are basically just named tuples.
-Finally, Unit structs. These don't have any fields and are useful for generics.
+Finally, Unit-like structs. These don't have any fields and are useful for generics.
In this exercise you need to complete and implement one of each kind.
Read more about structs in The Book: https://doc.rust-lang.org/book/ch05-01-defining-structs.html"""