File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ use crate::rustfmt_diff::{DiffLine, Mismatch};
10
10
/// future version of Rustfmt.
11
11
pub ( crate ) fn header ( ) -> String {
12
12
let mut xml_heading = String :: new ( ) ;
13
- xml_heading. push_str ( "<?xml version=\ " 1.0\ " encoding=\ " utf-8\ " ?>" ) ;
13
+ xml_heading. push_str ( r# "<?xml version="1.0" encoding="utf-8"?>"# ) ;
14
14
xml_heading. push_str ( "\n " ) ;
15
- xml_heading. push_str ( "<checkstyle version=\ " 4.3\ " >" ) ;
15
+ xml_heading. push_str ( r# "<checkstyle version="4.3">"# ) ;
16
16
xml_heading
17
17
}
18
18
@@ -32,16 +32,16 @@ pub(crate) fn output_checkstyle_file<T>(
32
32
where
33
33
T : Write ,
34
34
{
35
- write ! ( writer, "<file name=\ " {}\ " >" , filename. display( ) ) ?;
35
+ write ! ( writer, r# "<file name="{}">"# , filename. display( ) ) ?;
36
36
for mismatch in diff {
37
37
for line in mismatch. lines {
38
38
// Do nothing with `DiffLine::Context` and `DiffLine::Resulting`.
39
39
if let DiffLine :: Expected ( message) = line {
40
40
write ! (
41
41
writer,
42
- "<error line=\ " {}\ " severity=\ " warning\ " message=\ " Should be `{}`\" \
43
- />" ,
44
- mismatch . line_number , XmlEscaped ( & message)
42
+ r# "<error line="{}" severity="warning" message="Should be `{}`" />"# ,
43
+ mismatch . line_number ,
44
+ XmlEscaped ( & message)
45
45
) ?;
46
46
}
47
47
}
You can’t perform that action at this time.
0 commit comments