mirror of
https://github.com/servo/servo.git
synced 2025-08-23 22:35:33 +01:00
style: Avoid cloning all over the error reporter.
This commit is contained in:
parent
eaf27ccfa0
commit
b4de69e3eb
36 changed files with 186 additions and 154 deletions
|
@ -21,10 +21,6 @@ impl ParseErrorReporter for ErrorringErrorReporter {
|
|||
url: &ServoUrl) {
|
||||
panic!("CSS error: {}\t\n{:?} {}", url.as_str(), position, message);
|
||||
}
|
||||
|
||||
fn clone(&self) -> Box<ParseErrorReporter + Send + Sync> {
|
||||
Box::new(ErrorringErrorReporter)
|
||||
}
|
||||
}
|
||||
|
||||
struct AutoGCRuleTree<'a>(&'a RuleTree);
|
||||
|
@ -49,7 +45,7 @@ fn parse_rules(css: &str) -> Vec<(StyleSource, CascadeLevel)> {
|
|||
media_queries: vec![],
|
||||
},
|
||||
None,
|
||||
Box::new(ErrorringErrorReporter),
|
||||
&ErrorringErrorReporter,
|
||||
ParserContextExtraData {});
|
||||
let rules = s.rules.read();
|
||||
rules.0.iter().filter_map(|rule| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue