File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
cpp-linter/src/clang_tools Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -151,10 +151,7 @@ pub fn run_clang_format(
151151 format ! ( "Failed to parse XML output from clang-format for {file_name}" )
152152 } ) ?
153153 } else {
154- FormatAdvice {
155- replacements : vec ! [ ] ,
156- patched : None ,
157- }
154+ FormatAdvice :: default ( )
158155 } ;
159156 format_advice. patched = patched;
160157 if !format_advice. replacements . is_empty ( ) {
@@ -203,10 +200,7 @@ mod tests {
203200</replacements>"#
204201 . as_bytes ( )
205202 . to_vec ( ) ;
206- let expected = FormatAdvice {
207- replacements : vec ! [ ] ,
208- patched : None ,
209- } ;
203+ let expected = FormatAdvice :: default ( ) ;
210204 let xml = String :: from_utf8 ( xml_raw) . unwrap ( ) ;
211205 let document = quick_xml:: de:: from_str :: < FormatAdvice > ( & xml) . unwrap ( ) ;
212206 assert_eq ! ( expected, document) ;
You can’t perform that action at this time.
0 commit comments