From b1fe6c0be56b25111312415441e036772f68d048 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Fri, 3 Jan 2025 13:26:36 +0100 Subject: [PATCH] refactor: change method name --- src/chain.rs | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chain.rs b/src/chain.rs index 8fae9c0..bb7792b 100644 --- a/src/chain.rs +++ b/src/chain.rs @@ -140,7 +140,7 @@ impl Certificate { Ok(result) } - pub fn to_plain(&self) -> Result { + pub fn to_pem(&self) -> Result { match self.cert.to_pem() { Ok(pem) => String::from_utf8(pem).map_err(|_| ()), Err(_) => Err(()), diff --git a/src/main.rs b/src/main.rs index 263f112..564e196 100644 --- a/src/main.rs +++ b/src/main.rs @@ -131,7 +131,7 @@ fn main() -> Result<(), ()> { return Err(()); } for cert in chain.certs() { - match cert.to_plain() { + match cert.to_pem() { Ok(plain) => print!("{}", plain), Err(_) => { eprintln!(