We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4054bf4 commit b9a7124Copy full SHA for b9a7124
ed25519/src/pkcs8.rs
@@ -30,10 +30,7 @@ pub use pkcs8::der::{
30
use core::fmt;
31
32
#[cfg(feature = "pem")]
33
-use {
34
- alloc::string::{String, ToString},
35
- core::str,
36
-};
+use core::str;
37
38
#[cfg(feature = "zeroize")]
39
use zeroize::Zeroize;
@@ -323,10 +320,13 @@ impl str::FromStr for PublicKeyBytes {
323
320
}
324
321
325
322
326
-impl ToString for PublicKeyBytes {
327
- fn to_string(&self) -> String {
328
- self.to_public_key_pem(Default::default())
329
- .expect("PEM serialization error")
+impl fmt::Display for PublicKeyBytes {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ f.write_str(
+ &self
+ .to_public_key_pem(Default::default())
+ .expect("PEM serialization error"),
+ )
330
331
332
0 commit comments