Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Ensure all variants are matched during parsing
Browse files Browse the repository at this point in the history
Deny clippy::wildcard_enum_match_arm in parser to ensure any future
Nushell variants are caught.
  • Loading branch information
cassaundra committed Apr 10, 2024
1 parent e3f46c5 commit 3cb3202
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/quake_engine/src/nu/parse.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(clippy::wildcard_enum_match_arm)]

use std::sync::Arc;

use nu_parser::{discover_captures_in_expr, parse_internal_call};
Expand Down Expand Up @@ -389,6 +391,10 @@ fn modify_calls_in_pattern(
}
}
Pattern::Value(expr) => modify_calls_in_expr(working_set, decl_id, expr, func),
_ => {}
Pattern::Variable(_)
| Pattern::Rest(_)
| Pattern::IgnoreRest
| Pattern::IgnoreValue
| Pattern::Garbage => {}
}
}

0 comments on commit 3cb3202

Please sign in to comment.