refactor(linter): remove unused with_rules and set_rule methods (#8029)

this method is unused, hence it makes sense to remove.
furthermore, keeping it makes it tricky to work the nested config stuff
This commit is contained in:
camc314 2024-12-19 21:43:28 +00:00
parent 6344b934ae
commit b2a4a786ae
2 changed files with 0 additions and 14 deletions

View file

@ -70,13 +70,6 @@ impl ConfigStore {
Self { cache, base, overrides }
}
/// Set the base rules, replacing all existing rules.
#[cfg(test)]
#[inline]
pub fn set_rules(&mut self, new_rules: Vec<RuleWithSeverity>) {
self.base.rules = Arc::from(new_rules.into_boxed_slice());
}
pub fn number_of_rules(&self) -> usize {
self.base.rules.len()
}

View file

@ -79,13 +79,6 @@ impl Linter {
Self { options, config }
}
#[cfg(test)]
#[must_use]
pub fn with_rules(mut self, rules: Vec<RuleWithSeverity>) -> Self {
self.config.set_rules(rules);
self
}
/// Set the kind of auto fixes to apply.
///
/// # Example