Skip to content

Commit

Permalink
style: use ..Default::default() instead of explicitly initializing …
Browse files Browse the repository at this point in the history
…all fields in `Compiler`.
  • Loading branch information
plusvic committed Nov 22, 2024
1 parent ffe215a commit f2c69bd
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions lib/src/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,32 +452,16 @@ impl<'a> Compiler<'a> {
wasm_mod,
wasm_symbols,
wasm_exports,
relaxed_re_syntax: false,
cse: false,
hoisting: false,
error_on_slow_pattern: false,
error_on_slow_loop: false,
next_pattern_id: PatternId(0),
current_pattern_id: PatternId(0),
current_namespace: default_namespace,
features: FxHashSet::default(),
warnings: Warnings::default(),
errors: Vec::new(),
rules: Vec::new(),
sub_patterns: Vec::new(),
anchored_sub_patterns: Vec::new(),
atoms: Vec::new(),
re_code: Vec::new(),
imported_modules: Vec::new(),
ignored_modules: FxHashSet::default(),
banned_modules: FxHashMap::default(),
ignored_rules: FxHashMap::default(),
root_struct: Struct::new().make_root(),
report_builder: ReportBuilder::new(),
lit_pool: BStringPool::new(),
regexp_pool: StringPool::new(),
patterns: FxHashMap::default(),
ir_writer: None,
..Default::default()
}
}

Expand Down

0 comments on commit f2c69bd

Please sign in to comment.