Skip to content

Commit 7c07def

Browse files
authored
Merge pull request #1823 from admwrd/new-type-rewording
Update new_types.md wording
2 parents 57f1e70 + 596b7df commit 7c07def

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/generics/new_types.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ impl Days {
2525
}
2626
}
2727
28-
fn old_enough(age: &Years) -> bool {
28+
fn is_adult(age: &Years) -> bool {
2929
age.0 >= 18
3030
}
3131
3232
fn main() {
33-
let age = Years(5);
33+
let age = Years(25);
3434
let age_days = age.to_days();
35-
println!("Old enough {}", old_enough(&age));
36-
println!("Old enough {}", old_enough(&age_days.to_years()));
37-
// println!("Old enough {}", old_enough(&age_days));
35+
println!("Is an adult? {}", is_adult(&age));
36+
println!("Is an adult? {}", is_adult(&age_days.to_years()));
37+
// println!("Is an adult? {}", is_adult(&age_days));
3838
}
3939
```
4040

0 commit comments

Comments
 (0)