Skip to content

Commit

Permalink
refactor(asserts): Tuple destructuring
Browse files Browse the repository at this point in the history
Use tuple destructuring to make the code clearer

Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
  • Loading branch information
omertuc committed Dec 3, 2024
1 parent b4ea2d4 commit bfca193
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clap_builder/src/builder/debug_asserts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ pub(crate) fn assert_app(cmd: &Command) {
}

// requires, r_if, r_unless
for req in &arg.requires {
for (_predicate, req_id) in &arg.requires {
assert!(
cmd.id_exists(&req.1),
cmd.id_exists(req_id),
"Command {}: Argument or group '{}' specified in 'requires*' for '{}' does not exist",
cmd.get_name(),
req.1,
req_id,
arg.get_id(),
);
}
Expand Down

0 comments on commit bfca193

Please sign in to comment.