1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-12-01 22:51:45 +02:00

fix(structs1): rename to unit-like struct

This commit is contained in:
mokou
2022-07-14 12:00:46 +02:00
parent 19bec50399
commit 4dffa0d10d
2 changed files with 6 additions and 6 deletions

View File

@@ -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!");
}
}