mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 21:43:37 +00:00
Remove Attrs::merge
Only the `RawAttrs` version of this is in use
This commit is contained in:
parent
e47e7a0143
commit
81ccf37d3b
1 changed files with 0 additions and 12 deletions
|
@ -241,18 +241,6 @@ impl Attrs {
|
|||
raw_attrs.filter(db, def.krate(db))
|
||||
}
|
||||
|
||||
pub fn merge(&self, other: Attrs) -> Attrs {
|
||||
match (&self.0.entries, &other.0.entries) {
|
||||
(None, None) => Attrs::EMPTY,
|
||||
(Some(entries), None) | (None, Some(entries)) => {
|
||||
Attrs(RawAttrs { entries: Some(entries.clone()) })
|
||||
}
|
||||
(Some(a), Some(b)) => {
|
||||
Attrs(RawAttrs { entries: Some(a.iter().chain(b.iter()).cloned().collect()) })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn by_key(&self, key: &'static str) -> AttrQuery<'_> {
|
||||
AttrQuery { attrs: self, key }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue