diff options
author | iximeow <me@iximeow.net> | 2021-07-03 21:10:37 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-07-03 21:10:37 -0700 |
commit | b49987bdbd2b5a08163a45ef3dc1868754d84165 (patch) | |
tree | 95ddd66184893ef75a8acca276808a5be5381ffe /src/address | |
parent | 1a71764b221f6a0f497ab8ce4b6e52ff3fd79d60 (diff) |
document yaxpeax_arch traits and add an AddressDiff::to_const
Diffstat (limited to 'src/address')
-rw-r--r-- | src/address/mod.rs | 3 |
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 { |