Skip to content

Commit

Permalink
make from_str_radix accept width and radix
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Sep 16, 2024
1 parent b7cac71 commit 5d42ec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/value/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ impl BitVecValue {
out
}

pub fn from_str_radix(value: &str, width: WidthInt) -> Result<Self, ParseIntError> {
pub fn from_str_radix(value: &str, radix: u32, width: WidthInt) -> Result<Self, ParseIntError> {
let mut out = Self::zero(width);
out.assign_from_str_radix(value, 2)?;
out.assign_from_str_radix(value, radix)?;
Ok(out)
}

Expand Down

0 comments on commit 5d42ec9

Please # to comment.