Skip to content

Commit

Permalink
Merge pull request #53 from brave/swap_remove
Browse files Browse the repository at this point in the history
Implement Attributes::remove with IndexMap::swap_remove
  • Loading branch information
antonok-edm authored May 15, 2024
2 parents e850592 + dd07257 commit 4453dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ impl Attributes {

/// Like IndexMap::remove
pub fn remove<A: Into<LocalName>>(&mut self, local_name: A) -> Option<Attribute> {
self.map.remove(&ExpandedName::new(ns!(), local_name))
self.map.swap_remove(&ExpandedName::new(ns!(), local_name))
}
}

0 comments on commit 4453dc8

Please sign in to comment.