feat(nix-compat/nixhash): digest_length is const
Change-Id: I565f70b4dd7d44b176a1d6fe5009fdf5346c5ab6 Reviewed-on: https://cl.snix.dev/c/snix/+/30561 Reviewed-by: edef <edef@edef.eu> Tested-by: besadii Autosubmit: Florian Klink <flokli@flokli.de>
This commit is contained in:
parent
2dfbfebb47
commit
4a63d85b06
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue