@@ -7,9 +7,9 @@ use unicode_width::UnicodeWidthStr;
77use super :: format:: Alignment ;
88
99#[ cfg( any( not( windows) , not( feature="win_crlf" ) ) ) ]
10- pub static NEWLINE : & ' static [ u8 ] = b"\n " ;
10+ pub static NEWLINE : & [ u8 ] = b"\n " ;
1111#[ cfg( all( windows, feature="win_crlf" ) ) ]
12- pub static NEWLINE : & ' static [ u8 ] = b"\r \n " ;
12+ pub static NEWLINE : & [ u8 ] = b"\r \n " ;
1313
1414/// Internal utility for writing data into a string
1515pub struct StringWriter {
@@ -114,10 +114,10 @@ mod tests {
114114 #[ test]
115115 fn string_writer ( ) {
116116 let mut out = StringWriter :: new ( ) ;
117- out. write ( "foo" . as_bytes ( ) ) . unwrap ( ) ;
118- out. write ( " " . as_bytes ( ) ) . unwrap ( ) ;
119- out. write ( "" . as_bytes ( ) ) . unwrap ( ) ;
120- out. write ( "bar" . as_bytes ( ) ) . unwrap ( ) ;
117+ out. write_all ( b "foo") . unwrap ( ) ;
118+ out. write_all ( b " ") . unwrap ( ) ;
119+ out. write_all ( b"" ) . unwrap ( ) ;
120+ out. write_all ( b "bar") . unwrap ( ) ;
121121 assert_eq ! ( out. as_string( ) , "foo bar" ) ;
122122 }
123123
@@ -162,7 +162,7 @@ mod tests {
162162 #[ test]
163163 fn utf8_error ( ) {
164164 let mut out = StringWriter :: new ( ) ;
165- let res = out. write_all ( & vec ! [ 0 , 255 ] ) ;
165+ let res = out. write_all ( & [ 0 , 255 ] ) ;
166166 assert ! ( res. is_err( ) ) ;
167167 }
168168}
0 commit comments