mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Fix obsolete format traits.
They are to be removed from the language in the next rust upgrade.
This commit is contained in:
parent
141b5d038f
commit
b51e83819d
35 changed files with 63 additions and 63 deletions
|
@ -28,5 +28,5 @@ impl<T, I: Iterator<Result<T, SyntaxError>>> Iterator<T> for ErrorLoggerIterator
|
|||
/// to log CSS parse errors to stderr.
|
||||
pub fn log_css_error(location: SourceLocation, message: &str) {
|
||||
// TODO eventually this will got into a "web console" or something.
|
||||
info!("{:u}:{:u} {:s}", location.line, location.column, message)
|
||||
info!("{}:{} {}", location.line, location.column, message)
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_
|
|||
for item in ErrorLoggerIterator(parse_declaration_list(block.into_iter())) {
|
||||
match item {
|
||||
DeclarationListItem::AtRule(rule) => log_css_error(
|
||||
rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()),
|
||||
rule.location, format!("Unsupported at-rule in declaration list: @{}", rule.name).as_slice()),
|
||||
DeclarationListItem::Declaration(Declaration{ location, name, value, important }) => {
|
||||
if important {
|
||||
log_css_error(location, "!important is not allowed on @font-face descriptors");
|
||||
|
@ -94,7 +94,7 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_
|
|||
};
|
||||
},
|
||||
_ => {
|
||||
log_css_error(location, format!("Unsupported declaration {:s}", name).as_slice());
|
||||
log_css_error(location, format!("Unsupported declaration {}", name).as_slice());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2420,7 +2420,7 @@ pub fn parse_property_declaration_list<I: Iterator<Node>>(input: I, base_url: &U
|
|||
for item in items.into_iter().rev() {
|
||||
match item {
|
||||
DeclarationListItem::AtRule(rule) => log_css_error(
|
||||
rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()),
|
||||
rule.location, format!("Unsupported at-rule in declaration list: @{}", rule.name).as_slice()),
|
||||
DeclarationListItem::Declaration(Declaration{ location: l, name: n, value: v, important: i}) => {
|
||||
// TODO: only keep the last valid declaration for a given name.
|
||||
let (list, seen) = if i {
|
||||
|
|
|
@ -153,7 +153,7 @@ pub fn parse_nested_at_rule(context: &ParserContext,
|
|||
}
|
||||
"font-face" => parse_font_face_rule(rule, parent_rules, base_url),
|
||||
_ => log_css_error(rule.location,
|
||||
format!("Unsupported at-rule: @{:s}", lower_name).as_slice())
|
||||
format!("Unsupported at-rule: @{}", lower_name).as_slice())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue