This repository was archived by the owner on Oct 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ script:
1010
1111matrix :
1212 include :
13- - rust : 1.31.1
13+ - rust : 1.38.0
1414 env : CLIPPY=YESPLEASE
1515 before_script : rustup component add clippy-preview
1616 script : cargo clippy --all-targets --all -- -D warnings
17- - rust : 1.31.1
17+ - rust : 1.38.0
1818 env : RUSTFMT=YESPLEASE
1919 before_script : rustup component add rustfmt-preview
2020 script : cargo fmt --all -- --check
Original file line number Diff line number Diff line change @@ -269,11 +269,13 @@ mod test_helper {
269269 pub fn target ( & self ) -> Target {
270270 Target :: human ( self . formatter ( ) )
271271 }
272+ }
272273
273- pub fn to_string ( & self ) -> String {
274+ impl :: std:: fmt:: Display for TestTarget {
275+ fn fmt ( & self , f : & mut :: std:: fmt:: Formatter ) -> Result < ( ) , :: std:: fmt:: Error > {
274276 let target = self . buffer . 0 . clone ( ) ;
275277 let buffer = target. read ( ) . unwrap ( ) ;
276- String :: from_utf8_lossy ( buffer. as_slice ( ) ) . to_string ( )
278+ write ! ( f , "{}" , String :: from_utf8_lossy( buffer. as_slice( ) ) )
277279 }
278280 }
279281}
Original file line number Diff line number Diff line change @@ -279,11 +279,13 @@ mod test_helper {
279279 pub fn target ( & self ) -> Target {
280280 Target :: json ( self . formatter ( ) )
281281 }
282+ }
282283
283- pub fn to_string ( & self ) -> String {
284+ impl :: std:: fmt:: Display for TestTarget {
285+ fn fmt ( & self , f : & mut :: std:: fmt:: Formatter ) -> Result < ( ) , :: std:: fmt:: Error > {
284286 let target = self . buffer . 0 . clone ( ) ;
285287 let buffer = target. read ( ) . unwrap ( ) ;
286- String :: from_utf8_lossy ( buffer. as_slice ( ) ) . to_string ( )
288+ write ! ( f , "{}" , String :: from_utf8_lossy( buffer. as_slice( ) ) )
287289 }
288290 }
289291}
You can’t perform that action at this time.
0 commit comments