Skip to content

Commit

Permalink
Don't use let...else statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Abestanis committed Oct 6, 2023
1 parent 4f1003f commit 1485cd0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bindgen-cli/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,11 +1110,8 @@ where
{
(macro_definition.as_str(), Vec::new())
} else {
let Some((left_side, arguments)) =
macro_definition.split_once('(')
else {
panic!("Invalid function macro definition: No '(' for ')' at end found");
};
let (left_side, arguments) =
macro_definition.split_once('(').expect("Invalid function macro definition: No '(' for ')' at end found");
let arguments = &arguments[..arguments.len() - 1];
if arguments.trim().is_empty() {
// The empty argument list case `()`.
Expand Down

0 comments on commit 1485cd0

Please sign in to comment.