File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -176,8 +176,7 @@ impl core::fmt::Display for ClosureReason {
176176 f. write_str ( "Channel closed because " ) ?;
177177 match self {
178178 ClosureReason :: CounterpartyForceClosed { peer_msg } => {
179- f. write_str ( "counterparty force-closed with message " ) ?;
180- f. write_str ( & format ! ( "{}" , peer_msg) )
179+ f. write_fmt ( format_args ! ( "counterparty force-closed with message: {}" , peer_msg) )
181180 } ,
182181 ClosureReason :: HolderForceClosed => f. write_str ( "user manually force-closed the channel" ) ,
183182 ClosureReason :: CooperativeClosure => f. write_str ( "the channel was cooperatively closed" ) ,
Original file line number Diff line number Diff line change 99
1010//! Utilities for strings.
1111
12+ use alloc:: string:: String ;
1213use core:: fmt;
13- use crate :: util:: ser:: { Writeable , Writer , Readable } ;
1414use crate :: io:: { self , Read } ;
1515use crate :: ln:: msgs;
16+ use crate :: util:: ser:: { Writeable , Writer , Readable } ;
1617
1718/// A string that displays only printable characters, replacing control characters with
1819/// [`core::char::REPLACEMENT_CHARACTER`].
@@ -62,7 +63,7 @@ impl Readable for SanitizedString {
6263}
6364
6465impl fmt:: Display for SanitizedString {
65- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
66+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
6667 PrintableString ( & self . 0 ) . fmt ( f)
67- }
68- }
68+ }
69+ }
You can’t perform that action at this time.
0 commit comments