@@ -61,7 +61,9 @@ pub(crate) fn skip_ansi_escape_sequence<I: Iterator<Item = char>>(ch: char, char
6161
6262#[ cfg( feature = "unicode-width" ) ]
6363#[ inline]
64- fn ch_width ( ch : char ) -> usize { unicode_width:: UnicodeWidthChar :: width ( ch) . unwrap_or ( 0 ) }
64+ fn ch_width ( ch : char ) -> usize {
65+ unicode_width:: UnicodeWidthChar :: width ( ch) . unwrap_or ( 0 )
66+ }
6567
6668/// First character which [`ch_width`] will classify as double-width.
6769/// Please see [`display_width`].
@@ -224,7 +226,9 @@ pub struct Word<'a> {
224226impl std:: ops:: Deref for Word < ' _ > {
225227 type Target = str ;
226228
227- fn deref ( & self ) -> & Self :: Target { self . word }
229+ fn deref ( & self ) -> & Self :: Target {
230+ self . word
231+ }
228232}
229233
230234impl < ' a > Word < ' a > {
@@ -299,17 +303,23 @@ impl<'a> Word<'a> {
299303
300304impl Fragment for Word < ' _ > {
301305 #[ inline]
302- fn width ( & self ) -> f64 { self . width as f64 }
306+ fn width ( & self ) -> f64 {
307+ self . width as f64
308+ }
303309
304310 // We assume the whitespace consist of ' ' only. This allows us to
305311 // compute the display width in constant time.
306312 #[ inline]
307- fn whitespace_width ( & self ) -> f64 { self . whitespace . len ( ) as f64 }
313+ fn whitespace_width ( & self ) -> f64 {
314+ self . whitespace . len ( ) as f64
315+ }
308316
309317 // We assume the penalty is `""` or `"-"`. This allows us to
310318 // compute the display width in constant time.
311319 #[ inline]
312- fn penalty_width ( & self ) -> f64 { self . penalty . len ( ) as f64 }
320+ fn penalty_width ( & self ) -> f64 {
321+ self . penalty . len ( ) as f64
322+ }
313323}
314324
315325/// Forcibly break words wider than `line_width` into smaller words.
0 commit comments