File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1066,7 +1066,7 @@ impl<'a> Rewrite for ControlFlow<'a> {
1066
1066
debug ! ( "ControlFlow::rewrite {:?} {:?}" , self , shape) ;
1067
1067
1068
1068
let alt_block_sep = & shape. indent . to_string_with_newline ( context. config ) ;
1069
- let ( cond_str, used_width) = self . rewrite_cond ( context, shape, & alt_block_sep) ?;
1069
+ let ( cond_str, used_width) = self . rewrite_cond ( context, shape, alt_block_sep) ?;
1070
1070
// If `used_width` is 0, it indicates that whole control flow is written in a single line.
1071
1071
if used_width == 0 {
1072
1072
return Some ( cond_str) ;
@@ -1273,10 +1273,10 @@ fn rewrite_match(
1273
1273
let cond_str = cond. rewrite ( context, cond_shape) ?;
1274
1274
let alt_block_sep = & shape. indent . to_string_with_newline ( context. config ) ;
1275
1275
let block_sep = match context. config . control_brace_style ( ) {
1276
- ControlBraceStyle :: AlwaysNextLine => & alt_block_sep,
1276
+ ControlBraceStyle :: AlwaysNextLine => alt_block_sep,
1277
1277
_ if last_line_extendable ( & cond_str) => " " ,
1278
1278
// 2 = ` {`
1279
- _ if cond_str. contains ( '\n' ) || cond_str. len ( ) + 2 > cond_shape. width => & alt_block_sep,
1279
+ _ if cond_str. contains ( '\n' ) || cond_str. len ( ) + 2 > cond_shape. width => alt_block_sep,
1280
1280
_ => " " ,
1281
1281
} ;
1282
1282
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ mod types;
78
78
mod vertical;
79
79
pub mod visitor;
80
80
81
- const STDIN : & ' static str = "<stdin>" ;
81
+ const STDIN : & str = "<stdin>" ;
82
82
83
83
// A map of the files of a crate, with their new content
84
84
pub type FileMap = Vec < FileRecord > ;
@@ -753,7 +753,7 @@ pub struct ModifiedLines {
753
753
pub chunks : Vec < ModifiedChunk > ,
754
754
}
755
755
756
- /// The successful result of formatting via get_modified_lines().
756
+ /// The successful result of formatting via ` get_modified_lines()` .
757
757
pub struct ModifiedLinesResult {
758
758
/// The high level summary details
759
759
pub summary : Summary ,
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ pub fn rewrite_macro_def(
299
299
span : Span ,
300
300
) -> Option < String > {
301
301
let snippet = Some ( remove_trailing_white_spaces ( context. snippet ( span) ) ) ;
302
- if snippet. as_ref ( ) . map_or ( true , |s| s. ends_with ( ";" ) ) {
302
+ if snippet. as_ref ( ) . map_or ( true , |s| s. ends_with ( ';' ) ) {
303
303
return snippet;
304
304
}
305
305
Original file line number Diff line number Diff line change @@ -706,7 +706,7 @@ impl ConfigCodeBlock {
706
706
let fmt_skip = self . code_block
707
707
. as_ref ( )
708
708
. unwrap ( )
709
- . split ( " \n " )
709
+ . split ( '\n' )
710
710
. nth ( 0 )
711
711
. unwrap_or ( "" ) == "#![rustfmt_skip]" ;
712
712
You can’t perform that action at this time.
0 commit comments