mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
v3
This commit is contained in:
parent
74d8fdc8fe
commit
f79e8182c1
2 changed files with 31 additions and 57 deletions
|
@ -7,7 +7,7 @@ mod dnf;
|
|||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
use std::{collections::HashSet, fmt};
|
||||
use std::fmt;
|
||||
|
||||
use rustc_hash::FxHashSet;
|
||||
use tt::SmolStr;
|
||||
|
@ -58,8 +58,11 @@ impl CfgOptions {
|
|||
self.enabled.insert(CfgAtom::KeyValue { key, value });
|
||||
}
|
||||
|
||||
pub fn diff<'a>(&'a self, other: &'a CfgOptions) -> HashSet<&CfgAtom> {
|
||||
self.enabled.difference(&other.enabled).collect()
|
||||
pub fn difference<'a>(
|
||||
&'a self,
|
||||
other: &'a CfgOptions,
|
||||
) -> impl Iterator<Item = &'a CfgAtom> + 'a {
|
||||
self.enabled.difference(&other.enabled)
|
||||
}
|
||||
|
||||
pub fn apply_diff(&mut self, diff: CfgDiff) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue