Skip to content

Commit

Permalink
add easier way to access try_into for u64
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Jan 16, 2025
1 parent d907456 commit 0f844e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "baa"
version = "0.16.1"
version = "0.16.2"
edition = "2021"
authors = ["Kevin Laeufer <[email protected]>"]
description = "BitVector and Array Arithmetic"
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,11 @@ impl TryFrom<Value> for u64 {
}
}

impl Value {
pub fn try_into_u64(self) -> Result<u64, ()> {
<Self as TryInto<u64>>::try_into(self)
}
}

pub use array::*;
pub use bv::*;

0 comments on commit 0f844e1

Please sign in to comment.