Skip to content

Commit

Permalink
Agreement docs: Eliminate redundant nested peer_public_key in example.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Oct 26, 2023
1 parent 61ad435 commit fbbe41f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/agreement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@
//! let peer_public_key = {
//! // In a real application, the peer public key would be parsed out of a
//! // protocol message. Here we just generate one.
//! let peer_public_key = {
//! let peer_private_key =
//! agreement::EphemeralPrivateKey::generate(&agreement::X25519, &rng)?;
//! peer_private_key.compute_public_key()?
//! };
//! let peer_private_key =
//! agreement::EphemeralPrivateKey::generate(&agreement::X25519, &rng)?;
//! peer_private_key.compute_public_key()?
//! };
//!
//! agreement::UnparsedPublicKey::new(&agreement::X25519, peer_public_key)
//! };
Expand Down

0 comments on commit fbbe41f

Please sign in to comment.