Skip to content

Commit

Permalink
ed25519: fixup clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo committed Sep 30, 2024
1 parent 3991e09 commit de5f7cf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ed25519/src/pkcs8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ pub use pkcs8::der::{
use core::fmt;

#[cfg(feature = "pem")]
use {
alloc::string::{String, ToString},
core::str,
};
use core::str;

#[cfg(feature = "zeroize")]
use zeroize::Zeroize;
Expand Down Expand Up @@ -323,10 +320,13 @@ impl str::FromStr for PublicKeyBytes {
}

#[cfg(feature = "pem")]
impl ToString for PublicKeyBytes {
fn to_string(&self) -> String {
self.to_public_key_pem(Default::default())
.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"),
)
}
}

Expand Down

0 comments on commit de5f7cf

Please sign in to comment.