mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
clippy: Use if lets and remove redundant returns
This commit is contained in:
parent
5db663d61f
commit
d493a4476c
11 changed files with 22 additions and 29 deletions
|
@ -62,9 +62,8 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = token_set_union![
|
|||
const EXPR_RECOVERY_SET: TokenSet = token_set![LET_KW];
|
||||
|
||||
pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> {
|
||||
match literal(p) {
|
||||
Some(m) => return Some(m),
|
||||
None => (),
|
||||
if let Some(m) = literal(p) {
|
||||
return Some(m);
|
||||
}
|
||||
if paths::is_path_start(p) || p.at(L_ANGLE) {
|
||||
return Some(path_expr(p, r));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue