Skip to content

Commit 10a0ac7

Browse files
committed
Don't use let...else statement
1 parent 54d1ad7 commit 10a0ac7

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
@@ -1122,11 +1122,8 @@ where
11221122
{
11231123
(macro_definition.as_str(), Vec::new())
11241124
} else {
1125-
let Some((left_side, arguments)) =
1126-
macro_definition.split_once('(')
1127-
else {
1128-
panic!("Invalid function macro definition: No '(' for ')' at end found");
1129-
};
1125+
let (left_side, arguments) =
1126+
macro_definition.split_once('(').expect("Invalid function macro definition: No '(' for ')' at end found");
11301127
let arguments = &arguments[..arguments.len() - 1];
11311128
if arguments.trim().is_empty() {
11321129
// The empty argument list case `()`.

0 commit comments

Comments
 (0)