Prefer Default::default
over FxHash*::default
in struct constructors
This commit is contained in:
parent
ee81739dc1
commit
3c9258e604
82 changed files with 237 additions and 362 deletions
|
@ -382,9 +382,9 @@ impl Handler {
|
|||
emitter: Lock::new(e),
|
||||
continue_after_error: LockCell::new(true),
|
||||
delayed_span_bugs: Lock::new(Vec::new()),
|
||||
taught_diagnostics: Lock::new(FxHashSet::default()),
|
||||
emitted_diagnostic_codes: Lock::new(FxHashSet::default()),
|
||||
emitted_diagnostics: Lock::new(FxHashSet::default()),
|
||||
taught_diagnostics: Default::default(),
|
||||
emitted_diagnostic_codes: Default::default(),
|
||||
emitted_diagnostics: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,7 @@ impl Handler {
|
|||
/// tools that want to reuse a `Parser` cleaning the previously emitted diagnostics as well as
|
||||
/// the overall count of emitted error diagnostics.
|
||||
pub fn reset_err_count(&self) {
|
||||
*self.emitted_diagnostics.borrow_mut() = FxHashSet::default();
|
||||
self.emitted_diagnostics.borrow_mut().clear();
|
||||
self.err_count.store(0, SeqCst);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue