Use vec! in oid! macro

Signed-off-by: Klim Tsoutsman <klimusha@gmail.com>
This commit is contained in:
Klim Tsoutsman
2022-01-03 22:06:08 +11:00
parent b0277bb0ad
commit 430d907c42

View File

@@ -282,12 +282,7 @@ impl<'a> PartialEq<OID> for &'a OID {
#[macro_export] #[macro_export]
macro_rules! oid { macro_rules! oid {
( $( $e: expr ),* ) => {{ ( $( $e: expr ),* ) => {{
let mut res = Vec::new(); $crate::OID::new(vec![$($crate::BigUint::from($e as u64)),*])
$(
res.push($crate::BigUint::from($e as u64));
)*
$crate::OID::new(res)
}}; }};
} }