diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-08-19 12:05:40 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-08-19 12:05:40 +0200 |
commit | 3bdc218a8b3582b66fc7c6c8d9f2146ddb1ef6b5 (patch) | |
tree | 6f0b0714c244f888eb6e0227ae51f76f3135539d /tool/src | |
parent | 42458c88438a37e09f8dfa418e4f35252209a954 (diff) |
openpgp: Rename sigtype to typ, set_sigtype to set_typ.
- 'sig' in method names on Signature and OnePassSig is redundant,
and 'sigtype' is likely inherited from other implementations.
- Fixes #326.
Diffstat (limited to 'tool/src')
-rw-r--r-- | tool/src/commands/dump.rs | 4 | ||||
-rw-r--r-- | tool/src/commands/inspect.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs index 3cdd7c0a..27619b7a 100644 --- a/tool/src/commands/dump.rs +++ b/tool/src/commands/dump.rs @@ -260,7 +260,7 @@ impl PacketDumper { Signature(ref s) => { writeln!(output, "Signature Packet")?; writeln!(output, "{} Version: {}", i, s.version())?; - writeln!(output, "{} Type: {}", i, s.sigtype())?; + writeln!(output, "{} Type: {}", i, s.typ())?; writeln!(output, "{} Pk algo: {}", i, s.pk_algo())?; writeln!(output, "{} Hash algo: {}", i, s.hash_algo())?; if s.hashed_area().iter().count() > 0 { @@ -333,7 +333,7 @@ impl PacketDumper { OnePassSig(ref o) => { writeln!(output, "One-Pass Signature Packet")?; writeln!(output, "{} Version: {}", i, o.version())?; - writeln!(output, "{} Type: {}", i, o.sigtype())?; + writeln!(output, "{} Type: {}", i, o.typ())?; writeln!(output, "{} Pk algo: {}", i, o.pk_algo())?; writeln!(output, "{} Hash algo: {}", i, o.hash_algo())?; writeln!(output, "{} Issuer: {}", i, o.issuer())?; diff --git a/tool/src/commands/inspect.rs b/tool/src/commands/inspect.rs index a1997b7c..3dbd27e0 100644 --- a/tool/src/commands/inspect.rs +++ b/tool/src/commands/inspect.rs @@ -253,7 +253,7 @@ fn inspect_signatures(output: &mut io::Write, sigs: &[openpgp::packet::Signature]) -> Result<()> { use crate::openpgp::constants::SignatureType::*; for sig in sigs { - match sig.sigtype() { + match sig.typ() { Binary | Text => (), signature_type @ _ => writeln!(output, " Kind: {}", signature_type)?, |