Skip to content

Commit d7efd2a

Browse files
authored
Note on rusts implicit returns. (LukeMathWalker#24)
To avoid confusion.
1 parent e7f8d1c commit d7efd2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jira-wip/src/koans/01_ticket/04_visibility.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ mod visibility {
4545
panic!("A description cannot be longer than 3000 characters!");
4646
}
4747

48+
// Functions implicitly return the result of their last expression so we can omit
49+
// the `return` keyword here.
4850
Ticket {
4951
title,
5052
description,

0 commit comments

Comments
 (0)