Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Jun 9, 2024
1 parent 049bb7c commit 8642f6b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/sort_requires.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ fn get_expression_kind(expression: &Expression) -> Option<GroupKind> {
let Prefix::Name(token) = function_call.prefix() else {
return None;
};
let Some(name) = extract_identifier_from_token(token) else {
return None;
};
let name = extract_identifier_from_token(token)?;

if name == "require" {
Some(GroupKind::Require)
Expand All @@ -51,9 +49,7 @@ fn get_expression_kind(expression: &Expression) -> Option<GroupKind> {
else {
return None;
};
let Some(name) = extract_identifier_from_token(method_call.name()) else {
return None;
};
let name = extract_identifier_from_token(method_call.name())?;
if name == "GetService" {
Some(GroupKind::GetService)
} else {
Expand Down

0 comments on commit 8642f6b

Please sign in to comment.