Skip to content

Commit

Permalink
add deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
fluidvanadium committed Jan 27, 2025
1 parent b393ae9 commit 7b9aa71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion zingo-status/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zingo-status"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

[dependencies]
Expand Down
7 changes: 5 additions & 2 deletions zingo-status/src/confirmation_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ impl ConfirmationStatus {
}
}

/// Because the value inside the ConfirmationStatus means different things depending on the case, this function is poorly quantified and can lead to unexpected behavior.
/// Please use a match statement and be careful handling each case.
/// # Examples
///
Expand All @@ -205,7 +204,11 @@ impl ConfirmationStatus {
/// let status = ConfirmationStatus::Confirmed(15.into());
/// assert_eq!(status.get_height(), 15.into());
/// ```
pub(crate) fn get_height(&self) -> BlockHeight {
#[deprecated(
note = "Because the value inside the ConfirmationStatus means different things depending on the case, this function is poorly quantified and can lead to unexpected behavior.",
since = "0.1.1"
)]
pub fn get_height(&self) -> BlockHeight {
match self {
Self::Calculated(self_height) => *self_height,
Self::Mempool(self_height) => *self_height,
Expand Down

0 comments on commit 7b9aa71

Please sign in to comment.