File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,7 @@ pub use pkcs8::der::{
30
30
use core:: fmt;
31
31
32
32
#[ cfg( feature = "pem" ) ]
33
- use {
34
- alloc:: string:: { String , ToString } ,
35
- core:: str,
36
- } ;
33
+ use core:: str;
37
34
38
35
#[ cfg( feature = "zeroize" ) ]
39
36
use zeroize:: Zeroize ;
@@ -323,10 +320,13 @@ impl str::FromStr for PublicKeyBytes {
323
320
}
324
321
325
322
#[ cfg( feature = "pem" ) ]
326
- impl ToString for PublicKeyBytes {
327
- fn to_string ( & self ) -> String {
328
- self . to_public_key_pem ( Default :: default ( ) )
329
- . expect ( "PEM serialization error" )
323
+ impl fmt:: Display for PublicKeyBytes {
324
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
325
+ f. write_str (
326
+ & self
327
+ . to_public_key_pem ( Default :: default ( ) )
328
+ . expect ( "PEM serialization error" ) ,
329
+ )
330
330
}
331
331
}
332
332
You can’t perform that action at this time.
0 commit comments