From 430d907c4219696009279eb2aae212b28f95d5ad Mon Sep 17 00:00:00 2001 From: Klim Tsoutsman Date: Mon, 3 Jan 2022 22:06:08 +1100 Subject: [PATCH] Use `vec!` in `oid!` macro Signed-off-by: Klim Tsoutsman --- src/lib.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6ae9a73..3d990d3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -282,12 +282,7 @@ impl<'a> PartialEq for &'a OID { #[macro_export] macro_rules! oid { ( $( $e: expr ),* ) => {{ - let mut res = Vec::new(); - - $( - res.push($crate::BigUint::from($e as u64)); - )* - $crate::OID::new(res) + $crate::OID::new(vec![$($crate::BigUint::from($e as u64)),*]) }}; }