Skip to content

Commit

Permalink
refactor: improved code, removed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
m62624 committed Sep 9, 2023
1 parent 858c4c0 commit 1f80aa2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions flexible_inspect_rs/src/rules/rule_bytes/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ impl SimpleRulesBytes {
smr_must_not_be_found_without_subrules: IndexSet<RuleBytes>,
) -> Self {
let rgxst = regex::bytes::RegexSet::new(
&smr_must_be_found
smr_must_be_found
.iter()
.chain(&smr_must_not_be_found_with_subrules)
.chain(&smr_must_not_be_found_without_subrules)
.collect::<Vec<_>>(),
.chain(&smr_must_not_be_found_without_subrules),
)
.unwrap();
Self {
Expand Down
5 changes: 2 additions & 3 deletions flexible_inspect_rs/src/rules/rule_str/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,10 @@ impl SimpleRules {
smr_must_not_be_found_without_subrules: IndexSet<Rule>,
) -> Self {
let rgxst = regex::RegexSet::new(
&smr_must_be_found
smr_must_be_found
.iter()
.chain(&smr_must_not_be_found_with_subrules)
.chain(&smr_must_not_be_found_without_subrules)
.collect::<Vec<_>>(),
.chain(&smr_must_not_be_found_without_subrules),
)
.unwrap();
Self {
Expand Down

0 comments on commit 1f80aa2

Please sign in to comment.