@@ -634,7 +634,7 @@ mod css_validation {
634634
635635 // Use `mock-stylesheet-marker` where uBO uses `color: red` since we have control over the
636636 // parsing logic within the block.
637- let mock_stylesheet = format ! ( "{}{{mock-stylesheet-marker}}" , selector ) ;
637+ let mock_stylesheet = format ! ( "{selector }{{mock-stylesheet-marker}}" ) ;
638638 let mut pi = ParserInput :: new ( & mock_stylesheet) ;
639639 let mut parser = Parser :: new ( & mut pi) ;
640640 let mut parser_impl = QualifiedRuleParserImpl {
@@ -1137,17 +1137,17 @@ mod css_validation {
11371137 fn to_css < W : Write > ( & self , dest : & mut W ) -> FmtResult {
11381138 write ! ( dest, ":" ) ?;
11391139 match self {
1140- Self :: HasText ( text) => write ! ( dest, "has-text({})" , text ) ?,
1141- Self :: MatchesAttr ( text) => write ! ( dest, "matches-attr({})" , text ) ?,
1142- Self :: MatchesCss ( text) => write ! ( dest, "matches-css({})" , text ) ?,
1143- Self :: MatchesCssBefore ( text) => write ! ( dest, "matches-css-before({})" , text ) ?,
1144- Self :: MatchesCssAfter ( text) => write ! ( dest, "matches-css-after({})" , text ) ?,
1145- Self :: MatchesPath ( text) => write ! ( dest, "matches-path({})" , text ) ?,
1146- Self :: MinTextLength ( text) => write ! ( dest, "min-text-length({})" , text ) ?,
1147- Self :: Upward ( text) => write ! ( dest, "upward({})" , text ) ?,
1148- Self :: Xpath ( text) => write ! ( dest, "xpath({})" , text ) ?,
1149- Self :: AnythingElse ( name, None ) => write ! ( dest, "{}" , name ) ?,
1150- Self :: AnythingElse ( name, Some ( args) ) => write ! ( dest, "{}({})" , name , args ) ?,
1140+ Self :: HasText ( text) => write ! ( dest, "has-text({text })" ) ?,
1141+ Self :: MatchesAttr ( text) => write ! ( dest, "matches-attr({text })" ) ?,
1142+ Self :: MatchesCss ( text) => write ! ( dest, "matches-css({text })" ) ?,
1143+ Self :: MatchesCssBefore ( text) => write ! ( dest, "matches-css-before({text })" ) ?,
1144+ Self :: MatchesCssAfter ( text) => write ! ( dest, "matches-css-after({text })" ) ?,
1145+ Self :: MatchesPath ( text) => write ! ( dest, "matches-path({text })" ) ?,
1146+ Self :: MinTextLength ( text) => write ! ( dest, "min-text-length({text })" ) ?,
1147+ Self :: Upward ( text) => write ! ( dest, "upward({text })" ) ?,
1148+ Self :: Xpath ( text) => write ! ( dest, "xpath({text })" ) ?,
1149+ Self :: AnythingElse ( name, None ) => write ! ( dest, "{name}" ) ?,
1150+ Self :: AnythingElse ( name, Some ( args) ) => write ! ( dest, "{name }({args })" ) ?,
11511151 }
11521152 Ok ( ( ) )
11531153 }
@@ -1198,8 +1198,8 @@ mod css_validation {
11981198 fn to_css < W : Write > ( & self , dest : & mut W ) -> FmtResult {
11991199 write ! ( dest, "::" ) ?;
12001200 match self {
1201- Self ( name, None ) => write ! ( dest, "{}" , name ) ?,
1202- Self ( name, Some ( args) ) => write ! ( dest, "{}({})" , name , args ) ?,
1201+ Self ( name, None ) => write ! ( dest, "{name}" ) ?,
1202+ Self ( name, Some ( args) ) => write ! ( dest, "{name }({args })" ) ?,
12031203 }
12041204 Ok ( ( ) )
12051205 }
0 commit comments