summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openpgp/src/packet/compressed_data.rs4
-rw-r--r--openpgp/src/parse/parse.rs2
-rw-r--r--openpgp/src/parse/stream.rs4
-rw-r--r--openpgp/src/serialize/mod.rs4
-rw-r--r--tool/src/commands/dump.rs2
5 files changed, 8 insertions, 8 deletions
diff --git a/openpgp/src/packet/compressed_data.rs b/openpgp/src/packet/compressed_data.rs
index 70691ccb..7d042ace 100644
--- a/openpgp/src/packet/compressed_data.rs
+++ b/openpgp/src/packet/compressed_data.rs
@@ -49,12 +49,12 @@ impl CompressedData {
}
/// Gets the compression algorithm.
- pub fn algorithm(&self) -> CompressionAlgorithm {
+ pub fn algo(&self) -> CompressionAlgorithm {
self.algo
}
/// Sets the compression algorithm.
- pub fn set_algorithm(&mut self, algo: CompressionAlgorithm) -> CompressionAlgorithm {
+ pub fn set_algo(&mut self, algo: CompressionAlgorithm) -> CompressionAlgorithm {
::std::mem::replace(&mut self.algo, algo)
}
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs
index 2c881662..b2a62881 100644
--- a/openpgp/src/parse/parse.rs
+++ b/openpgp/src/parse/parse.rs
@@ -2189,7 +2189,7 @@ fn compressed_data_parser_test () {
// We expect a compressed packet containing a literal data
// packet, and that is it.
if let Packet::CompressedData(ref compressed) = pp.packet {
- assert_eq!(compressed.algorithm(), i.into());
+ assert_eq!(compressed.algo(), i.into());
} else {
panic!("Wrong packet!");
}
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs
index ee7cd39b..f5b4b196 100644
--- a/openpgp/src/parse/stream.rs
+++ b/openpgp/src/parse/stream.rs
@@ -597,7 +597,7 @@ impl<'a, H: VerificationHelper> Verifier<'a, H> {
match pp.packet {
Packet::CompressedData(ref p) =>
- v.structure.new_compression_layer(p.algorithm()),
+ v.structure.new_compression_layer(p.algo()),
Packet::OnePassSig(ref ops) => {
v.structure.push_ops(ops);
issuers.push(ops.issuer().clone().into());
@@ -1392,7 +1392,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
match pp.packet {
Packet::CompressedData(ref p) =>
- v.structure.new_compression_layer(p.algorithm()),
+ v.structure.new_compression_layer(p.algo()),
Packet::SEIP(_) | Packet::AED(_) => {
saw_content = true;
diff --git a/openpgp/src/serialize/mod.rs b/openpgp/src/serialize/mod.rs
index 92ce5f2a..7cf86e11 100644
--- a/openpgp/src/serialize/mod.rs
+++ b/openpgp/src/serialize/mod.rs
@@ -1693,14 +1693,14 @@ impl Serialize for CompressedData {
if TRACE {
eprintln!("CompressedData::serialize(\
algo: {}, {:?} children, {:?} bytes)",
- self.algorithm(),
+ self.algo(),
self.children().count(),
self.body().len());
}
let o = stream::Message::new(o);
let mut o = stream::Compressor::new_naked(
- o, self.algorithm(), Default::default(), 0)?;
+ o, self.algo(), Default::default(), 0)?;
// Serialize the packets.
for p in self.children() {
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs
index 16ff8ac7..aed7fb15 100644
--- a/tool/src/commands/dump.rs
+++ b/tool/src/commands/dump.rs
@@ -566,7 +566,7 @@ impl PacketDumper {
},
CompressedData(ref c) => {
- writeln!(output, "{} Algorithm: {}", i, c.algorithm())?;
+ writeln!(output, "{} Algorithm: {}", i, c.algo())?;
},
PKESK(ref p) => {