memuse 0.2

This commit is contained in:
Jack Grigg 2021-09-14 20:40:15 +01:00
parent 4488288ac0
commit 414eef3ce5
2 changed files with 13 additions and 3 deletions

View File

@ -29,7 +29,7 @@ fpe = "0.5"
group = "0.11"
halo2 = "0.0"
lazy_static = "1"
memuse = { version = "0.1", features = ["nonempty"] }
memuse = { version = "0.2", features = ["nonempty"] }
pasta_curves = "0.2"
proptest = { version = "1.0.0", optional = true }
rand = "0.8"

View File

@ -5,7 +5,7 @@ pub mod commitments;
use std::io;
use blake2b_simd::Hash as Blake2bHash;
use memuse::{DynamicUsage, NoDynamicUsage};
use memuse::DynamicUsage;
use nonempty::NonEmpty;
use zcash_note_encryption::try_note_decryption;
@ -134,7 +134,17 @@ impl<T> Action<T> {
}
}
impl NoDynamicUsage for Action<redpallas::Signature<SpendAuth>> {}
impl DynamicUsage for Action<redpallas::Signature<SpendAuth>> {
#[inline(always)]
fn dynamic_usage(&self) -> usize {
0
}
#[inline(always)]
fn dynamic_usage_bounds(&self) -> (usize, Option<usize>) {
(0, Some(0))
}
}
/// Orchard-specific flags.
#[derive(Clone, Copy, Debug)]