From 320884d10326fe186e974352391d51caa5cde571 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 6 May 2020 13:32:13 +0200 Subject: openpgp: Streamline iteration over MessageStructure. - Implement IntoIter and Deref to &'a [MessageLayer<'a>], drop the custom iteration structs. --- openpgp-ffi/examples/decrypt-with.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openpgp-ffi/examples') diff --git a/openpgp-ffi/examples/decrypt-with.c b/openpgp-ffi/examples/decrypt-with.c index 8bdb2d9d..4519a2f1 100644 --- a/openpgp-ffi/examples/decrypt-with.c +++ b/openpgp-ffi/examples/decrypt-with.c @@ -41,7 +41,8 @@ get_certs_cb (void *cookie_raw, static pgp_status_t check_cb (void *cookie_opaque, pgp_message_structure_t structure) { - pgp_message_structure_iter_t iter = pgp_message_structure_iter (structure); + pgp_message_structure_iter_t iter = + pgp_message_structure_into_iter (structure); for (pgp_message_layer_t layer = pgp_message_structure_iter_next (iter); layer; @@ -142,7 +143,6 @@ check_cb (void *cookie_opaque, pgp_message_structure_t structure) } pgp_message_structure_iter_free (iter); - pgp_message_structure_free (structure); /* Implement your verification policy here. */ return PGP_STATUS_SUCCESS; -- cgit v1.2.3