Implicit return

Co-Authored-By: phansch <dev@phansch.net>
This commit is contained in:
Wilco Kusee 2019-02-27 22:15:33 +01:00 committed by Philipp Hansch
parent c83b0298d7
commit ef97c13f5e
No known key found for this signature in database
GPG Key ID: B6FA06A6E0E2665B
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ In our example, the implementation would look like:
fn is_foo_fn(fn_kind: FnKind<'_>) -> bool { fn is_foo_fn(fn_kind: FnKind<'_>) -> bool {
match fn_kind { match fn_kind {
FnKind::ItemFn(ident, ..) | FnKind::Method(ident, ..) => { FnKind::ItemFn(ident, ..) | FnKind::Method(ident, ..) => {
return ident.name == "foo" ident.name == "foo"
}, },
FnKind::Closure(..) => false FnKind::Closure(..) => false
} }