]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
rust: Remove unused N_DIGEST_ALGORITHMS constant from crypto_digest.rs.
authorIsis Lovecruft <isis@torproject.org>
Fri, 15 Jun 2018 23:22:43 +0000 (23:22 +0000)
committerIsis Lovecruft <isis@torproject.org>
Fri, 15 Jun 2018 23:22:43 +0000 (23:22 +0000)
In the C code, this constant is only ever used in src/test/bench.c.

 * FIXES part of #26245: https://bugs.torproject.org/26245

src/rust/external/crypto_digest.rs

index b55389ac515921116055d840f153084698a2e03c..4eae1550a23c2e96108d0b257e0c3e110d73341e 100644 (file)
@@ -66,13 +66,6 @@ const DIGEST_SHA512: digest_algorithm_t = 2;
 const DIGEST_SHA3_256: digest_algorithm_t = 3;
 const DIGEST_SHA3_512: digest_algorithm_t = 4;
 
-/// The total number of digest algorithms we currently support.
-///
-/// We can't access these from Rust, because their definitions in C require
-/// introspecting the `digest_algorithm_t` typedef, which is an enum, so we have
-/// to redefine them here.
-const N_DIGEST_ALGORITHMS: usize = DIGEST_SHA3_512 as usize + 1;
-
 /// The number of hash digests we produce for a `common_digests_t`.
 ///
 /// We can't access these from Rust, because their definitions in C require