From 12ad2eff686ff4cd28b92300ad65bd01da507cef Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Thu, 15 Jun 2023 19:41:35 +0200 Subject: [PATCH] update parameter from sk to private_key --- src/keypair.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/keypair.rs b/src/keypair.rs index 15f1090f..08e0103b 100644 --- a/src/keypair.rs +++ b/src/keypair.rs @@ -53,9 +53,12 @@ impl> KeyPair { } /// Obtains a KeyPair from a private key - pub fn from_private_key(sk: S) -> Result> { - let pk = sk.public_key()?; - Ok(Self { pk, sk }) + pub fn from_private_key(private_key: S) -> Result> { + let pk = private_key.public_key()?; + Ok(Self { + pk, + sk: private_key, + }) } }