diff --git a/snix/nix-compat/src/nixhash/algos.rs b/snix/nix-compat/src/nixhash/algos.rs index 1d98eba0a..91410d3dc 100644 --- a/snix/nix-compat/src/nixhash/algos.rs +++ b/snix/nix-compat/src/nixhash/algos.rs @@ -15,7 +15,7 @@ pub enum HashAlgo { impl HashAlgo { // return the number of bytes in the digest of the given hash algo. - pub fn digest_length(&self) -> usize { + pub const fn digest_length(&self) -> usize { match self { HashAlgo::Sha1 => 20, HashAlgo::Sha256 => 32,