aboutsummaryrefslogtreecommitdiff
path: root/src/address/mod.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-07-03 21:10:37 -0700
committeriximeow <me@iximeow.net>2021-07-03 21:10:37 -0700
commitb49987bdbd2b5a08163a45ef3dc1868754d84165 (patch)
tree95ddd66184893ef75a8acca276808a5be5381ffe /src/address/mod.rs
parent1a71764b221f6a0f497ab8ce4b6e52ff3fd79d60 (diff)
document yaxpeax_arch traits and add an AddressDiff::to_const
Diffstat (limited to 'src/address/mod.rs')
-rw-r--r--src/address/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/address/mod.rs b/src/address/mod.rs
index e44ca13..31f2079 100644
--- a/src/address/mod.rs
+++ b/src/address/mod.rs
@@ -68,6 +68,9 @@ impl<T: Address> AddressDiff<T> {
pub fn from_const(amount: T::Diff) -> Self {
AddressDiff { amount }
}
+ pub fn to_const(&self) -> T::Diff {
+ self.amount
+ }
}
impl<T: Address> fmt::Debug for AddressDiff<T> where T::Diff: fmt::Debug {