fixup! parser: apply link def attrs to link
This commit is contained in:
parent
dcb3b787a2
commit
451b2360f4
1 changed files with 3 additions and 3 deletions
|
@ -62,9 +62,9 @@ impl<'s> Attributes<'s> {
|
||||||
pub fn union(&mut self, other: Self) {
|
pub fn union(&mut self, other: Self) {
|
||||||
if let Some(attrs0) = &mut self.0 {
|
if let Some(attrs0) = &mut self.0 {
|
||||||
if let Some(mut attrs1) = other.0 {
|
if let Some(mut attrs1) = other.0 {
|
||||||
for (attr, val) in attrs1.drain(..) {
|
for (key, val) in attrs1.drain(..) {
|
||||||
if !attrs0.iter().any(|(a, _)| *a == attr) {
|
if !attrs0.iter().any(|(k, _)| *k == key) {
|
||||||
attrs0.push((attr, val));
|
attrs0.push((key, val));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue