Skip to content

Commit 1485cd0

Browse files
committed
Don't use let...else statement
1 parent 4f1003f commit 1485cd0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

bindgen-cli/options.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1110,11 +1110,8 @@ where
11101110
{
11111111
(macro_definition.as_str(), Vec::new())
11121112
} else {
1113-
let Some((left_side, arguments)) =
1114-
macro_definition.split_once('(')
1115-
else {
1116-
panic!("Invalid function macro definition: No '(' for ')' at end found");
1117-
};
1113+
let (left_side, arguments) =
1114+
macro_definition.split_once('(').expect("Invalid function macro definition: No '(' for ')' at end found");
11181115
let arguments = &arguments[..arguments.len() - 1];
11191116
if arguments.trim().is_empty() {
11201117
// The empty argument list case `()`.

0 commit comments

Comments
 (0)