From 5d42ec9e843d6f4d9feae3cad1a9f2a296f1b37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20L=C3=A4ufer?= Date: Mon, 16 Sep 2024 13:52:44 -0400 Subject: [PATCH] make from_str_radix accept width and radix --- src/value/owned.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/value/owned.rs b/src/value/owned.rs index d370847..4f28400 100644 --- a/src/value/owned.rs +++ b/src/value/owned.rs @@ -27,9 +27,9 @@ impl BitVecValue { out } - pub fn from_str_radix(value: &str, width: WidthInt) -> Result { + pub fn from_str_radix(value: &str, radix: u32, width: WidthInt) -> Result { let mut out = Self::zero(width); - out.assign_from_str_radix(value, 2)?; + out.assign_from_str_radix(value, radix)?; Ok(out) }