Skip to content

Commit

Permalink
Add deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanuppal committed Nov 29, 2024
1 parent 1dda159 commit f6bdec3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "baa"
version = "0.14.5"
version = "0.15.0"
edition = "2021"
authors = ["Kevin Laeufer <[email protected]>"]
description = "BitVector and Array Arithmetic"
Expand All @@ -14,8 +14,8 @@ rust-version = "1.73.0"

[dependencies]
# optional dependencies for crate interop
fraction = { version = "0.11", optional = true }
num-bigint = { version = "0.4", optional = true}
fraction = { version = "0.15", optional = true }
num-bigint = { version = "0.4", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }


Expand Down
9 changes: 9 additions & 0 deletions src/bv/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,15 @@ pub trait BitVecOps {
self.width() == 1 && self.words()[0] == 0
}

#[deprecated(since = "0.15.0", note = "please use `is_true` instead")]
fn is_tru(&self) -> bool {
self.is_true()
}
#[deprecated(since = "0.15.0", note = "please use `is_false` instead")]
fn is_fals(&self) -> bool {
self.is_false()
}

fn is_zero(&self) -> bool {
self.words().iter().all(|w| *w == 0)
}
Expand Down
9 changes: 9 additions & 0 deletions src/bv/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ impl BitVecValue {
Self(FALSE_VALUE.clone())
}

#[deprecated(since = "0.15.0", note = "please use `new_true` instead")]
pub fn tru() -> Self {
Self::new_true()
}
#[deprecated(since = "0.15.0", note = "please use `new_false` instead")]
pub fn fals() -> Self {
Self::new_false()
}

#[cfg(feature = "bigint")]
pub fn from_big_int(value: &num_bigint::BigInt, bits: WidthInt) -> Self {
let mut out = Self::zero(bits);
Expand Down

0 comments on commit f6bdec3

Please sign in to comment.