summaryrefslogtreecommitdiffstats
path: root/openpgp/examples
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-08-24 15:18:36 +0200
committerJustus Winter <justus@sequoia-pgp.org>2018-08-24 15:27:36 +0200
commit14e059831e382b1cda693ed344b71a81d9d8a568 (patch)
tree98fe49abefce5158fd9842f0038956f2b8324686 /openpgp/examples
parent30f525ee2a7b92f17878704f4bcc3cafe6006dde (diff)
openpgp: Make PacketParser's next() and recurse() return two tuples.
- This logically groups the returned values, and makes it easier to ignore both packet-related values. - See #27.
Diffstat (limited to 'openpgp/examples')
-rw-r--r--openpgp/examples/decrypt-with.rs2
-rw-r--r--openpgp/examples/notarize.rs2
-rw-r--r--openpgp/examples/statistics.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/examples/decrypt-with.rs b/openpgp/examples/decrypt-with.rs
index e023bcb9..4bcd4e9c 100644
--- a/openpgp/examples/decrypt-with.rs
+++ b/openpgp/examples/decrypt-with.rs
@@ -93,7 +93,7 @@ pub fn main() {
State::Done => State::Done,
};
- let (packet, _, ppr_tmp, _) = pp.recurse()
+ let ((packet, _), (ppr_tmp, _)) = pp.recurse()
.expect("Failed to recurse");
ppr = ppr_tmp;
diff --git a/openpgp/examples/notarize.rs b/openpgp/examples/notarize.rs
index d3426131..882fbb21 100644
--- a/openpgp/examples/notarize.rs
+++ b/openpgp/examples/notarize.rs
@@ -80,7 +80,7 @@ fn main() {
_ => (),
}
- let (_, _, ppr_tmp, _) = pp.recurse()
+ let (_, (ppr_tmp, _)) = pp.recurse()
.expect("Failed to recurse");
ppr = ppr_tmp;
}
diff --git a/openpgp/examples/statistics.rs b/openpgp/examples/statistics.rs
index a5d75dda..2253cc61 100644
--- a/openpgp/examples/statistics.rs
+++ b/openpgp/examples/statistics.rs
@@ -59,7 +59,7 @@ fn main() {
};
// Get the packet and advance the parser.
- let (packet, _, tmp, _) = pp.next()
+ let ((packet, _), (tmp, _)) = pp.next()
.expect("Failed to get next packet");
ppr = tmp;