mirror of https://github.com/rust-lang/rust.git
Implicit return
Co-Authored-By: phansch <dev@phansch.net>
This commit is contained in:
parent
c83b0298d7
commit
ef97c13f5e
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue