summaryrefslogtreecommitdiffstats
path: root/openpgp/src/keyid.rs
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2020-04-06 17:26:23 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2020-04-06 18:35:13 +0200
commitdfb77ce88553c3d81eeac3677b2e1d657833bb55 (patch)
tree74c23c39ad03be35744bb17b9bb1559da37aa36f /openpgp/src/keyid.rs
parent74e99d43769396d32820fa9c233ed7c541b13820 (diff)
openpgp: Rename as_slice to as_bytes.
- KeyID::as_slice and KeyID::from_bytes mirror each other. This should be reflected in the functions' names. Also, as_bytes is more descriptive. - Same for Fingerprint::as_slice and Fingerprint::as_bytes. - KeyHandle::as_slice renamed for consistency.
Diffstat (limited to 'openpgp/src/keyid.rs')
-rw-r--r--openpgp/src/keyid.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs
index cdb14ec0..9ef9f90b 100644
--- a/openpgp/src/keyid.rs
+++ b/openpgp/src/keyid.rs
@@ -160,7 +160,7 @@ impl KeyID {
}
/// Returns a reference to the raw KeyID.
- pub fn as_slice(&self) -> &[u8] {
+ pub fn as_bytes(&self) -> &[u8] {
match self {
&KeyID::V4(ref id) => id,
&KeyID::Invalid(ref id) => id,
@@ -174,7 +174,7 @@ impl KeyID {
/// Returns true if this is a wild card ID.
pub fn is_wildcard(&self) -> bool {
- self.as_slice().iter().all(|b| *b == 0)
+ self.as_bytes().iter().all(|b| *b == 0)
}
/// Common code for the above functions.