Skip to content

Commit 9859d62

Browse files
committed
Use Self more in ring::agreement.
1 parent 7e524b5 commit 9859d62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/agreement.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ impl<'a> EphemeralPrivateKey {
103103
/// Generate a new ephemeral private key for the given algorithm.
104104
pub fn generate(
105105
alg: &'static Algorithm, rng: &rand::SecureRandom,
106-
) -> Result<EphemeralPrivateKey, error::Unspecified> {
106+
) -> Result<Self, error::Unspecified> {
107107
// NSA Guide Step 1.
108108
//
109109
// This only handles the key generation part of step 1. The rest of
110110
// step one is done by `compute_public_key()`.
111111
let private_key = ec::Seed::generate(&alg.curve, rng)?;
112-
Ok(EphemeralPrivateKey { private_key, alg })
112+
Ok(Self { private_key, alg })
113113
}
114114

115115
/// Computes the public key from the private key.

0 commit comments

Comments
 (0)