From 799d077d559f0184cd6f14a7a71ae0fba5f79c35 Mon Sep 17 00:00:00 2001 From: RyanSquared Date: Sun, 7 Jan 2024 21:51:21 -0500 Subject: [PATCH] openpgp-card: optimize use of iter/collect to use to_vec --- openpgp-card/src/lib.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/openpgp-card/src/lib.rs b/openpgp-card/src/lib.rs index 82081f1..e34e86a 100644 --- a/openpgp-card/src/lib.rs +++ b/openpgp-card/src/lib.rs @@ -1205,12 +1205,7 @@ impl<'a> Transaction<'a> { log::info!("OpenPgpTransaction: set_creation_time"); // Timestamp update - let time_value: Vec = time - .get() - .to_be_bytes() - .iter() - .copied() - .collect(); + let time_value: Vec = time.get().to_be_bytes().to_vec(); let cmd = commands::put_data(key_type.timestamp_put_tag(), time_value);