diff options
author | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2020-04-01 11:21:33 +0200 |
---|---|---|
committer | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2020-04-03 15:11:08 +0200 |
commit | 9fa0c1972a9f36e3a55da95d4eed44601d4a3f9f (patch) | |
tree | 5cebc2b5ea251e485737eb6f5ec1fbcb076a959a /openpgp/src/serialize/stream.rs | |
parent | b0dbca2064163a41f73559d787456e8bab7b5cb9 (diff) |
Change function names to align to Rust naming conventions.
- Change `mark_parts_public` to `parts_into_public`,
- Change `mark_parts_public_ref` to `parts_as_public`,
- Change `mark_parts_secret` to `parts_into_secret`,
- Change `mark_parts_secret_ref` to `parts_as_secret`,
- Change `mark_parts_unspecified` to `parts_into_unspecified`,
- Change `mark_parts_unspecified_ref` to `parts_as_unspecified`,
- Fixes #452.
Diffstat (limited to 'openpgp/src/serialize/stream.rs')
-rw-r--r-- | openpgp/src/serialize/stream.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs index 04d610ff..8f377334 100644 --- a/openpgp/src/serialize/stream.rs +++ b/openpgp/src/serialize/stream.rs @@ -253,7 +253,7 @@ impl<'a> Signer<'a> { /// # .unwrap(); /// # let keypair = tsk.keys().with_policy(p, None).alive().revoked(false).for_signing() /// # .nth(0).unwrap() - /// # .key().clone().mark_parts_secret().unwrap().into_keypair().unwrap(); + /// # .key().clone().parts_into_secret().unwrap().into_keypair().unwrap(); /// # f(tsk, keypair).unwrap(); /// # fn f(cert: Cert, mut signing_keypair: KeyPair) /// # -> Result<()> { @@ -362,7 +362,7 @@ impl<'a> Signer<'a> { /// # let keypair /// # = tsk.keys().with_policy(p, None).alive().revoked(false).for_signing() /// # .nth(0).unwrap() - /// # .key().clone().mark_parts_secret().unwrap().into_keypair() + /// # .key().clone().parts_into_secret().unwrap().into_keypair() /// # .unwrap(); /// # f(tsk, keypair).unwrap(); /// # fn f(cert: Cert, mut signing_keypair: KeyPair) @@ -928,7 +928,7 @@ impl<'a> Recipient<'a> { { Recipient { keyid, - key: key.mark_parts_public_ref().mark_role_unspecified_ref(), + key: key.parts_as_public().mark_role_unspecified_ref(), } } @@ -1523,7 +1523,7 @@ mod test { let mut o = vec![]; { let mut signers = keys.iter().map(|(_, key)| { - key.clone().mark_parts_secret().unwrap().into_keypair() + key.clone().parts_into_secret().unwrap().into_keypair() .expect("expected unencrypted secret key") }).collect::<Vec<KeyPair>>(); @@ -1721,7 +1721,7 @@ mod test { let mut keypair = self.tsk.keys().with_policy(self.policy, None) .for_transport_encryption() .map(|ka| ka.key()).next().unwrap() - .clone().mark_parts_secret().unwrap() + .clone().parts_into_secret().unwrap() .into_keypair().unwrap(); pkesks[0].decrypt(&mut keypair, sym_algo) .and_then(|(algo, session_key)| decrypt(algo, &session_key)) @@ -1847,7 +1847,7 @@ mod test { let mut o = vec![]; { let signer_keypair : KeyPair = - ka.key().clone().mark_parts_secret().unwrap().into_keypair() + ka.key().clone().parts_into_secret().unwrap().into_keypair() .expect("expected unencrypted secret key"); let m = Message::new(&mut o); |