From b49987bdbd2b5a08163a45ef3dc1868754d84165 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 3 Jul 2021 21:10:37 -0700 Subject: document yaxpeax_arch traits and add an AddressDiff::to_const --- src/address/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/address') 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 AddressDiff { pub fn from_const(amount: T::Diff) -> Self { AddressDiff { amount } } + pub fn to_const(&self) -> T::Diff { + self.amount + } } impl fmt::Debug for AddressDiff where T::Diff: fmt::Debug { -- cgit v1.1