mirror of
https://github.com/mbilker/kbinxml-rs.git
synced 2026-09-07 10:05:13 -05:00
node: use swap_remove for attributes
This commit is contained in:
@@ -200,7 +200,7 @@ impl Node {
|
||||
}
|
||||
|
||||
pub fn remove_attr(&mut self, key: &str) -> Option<String> {
|
||||
self.attributes.as_mut().and_then(|attributes| attributes.remove(key))
|
||||
self.attributes.as_mut().and_then(|attributes| attributes.swap_remove(key))
|
||||
}
|
||||
|
||||
pub fn sort_attrs(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user