mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
style: Avoid some allocations in selector serialization.
The allocations in display_to_css_identifier show up in the profiles of bug 1675628. Differential Revision: https://phabricator.services.mozilla.com/D97856
This commit is contained in:
parent
4ea378a6ae
commit
9f40b9ba38
19 changed files with 220 additions and 114 deletions
|
@ -478,7 +478,7 @@ impl<'a> SelectorVisitor for SelectorDependencyCollector<'a> {
|
|||
Component::Class(..) => &mut self.map.class_to_selector,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
let entry = match map.try_entry(atom.clone(), self.quirks_mode) {
|
||||
let entry = match map.try_entry(atom.0.clone(), self.quirks_mode) {
|
||||
Ok(entry) => entry,
|
||||
Err(err) => {
|
||||
*self.alloc_error = Some(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue