Skip to content

Commit 74069f5

Browse files
authored
Merge pull request #1017 from michel-zimmer/master
Simplify new type idiom example
2 parents e843487 + d10ca39 commit 74069f5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/generics/new_types.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ impl Days {
2626
}
2727
2828
fn old_enough(age: &Years) -> bool {
29-
if age.0 >= 18 {
30-
return true
31-
}
32-
false
29+
age.0 >= 18
3330
}
3431
3532
fn main() {

0 commit comments

Comments
 (0)