From 097fa0c7b11a0c1f0ef43965a872d63548e3824f Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 9 Oct 2019 17:29:01 +0200 Subject: [PATCH] Clarify a comment in constant_hash::generate_table; --- cranelift/codegen/shared/src/constant_hash.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cranelift/codegen/shared/src/constant_hash.rs b/cranelift/codegen/shared/src/constant_hash.rs index 668dc9f657..e16d58f5bc 100644 --- a/cranelift/codegen/shared/src/constant_hash.rs +++ b/cranelift/codegen/shared/src/constant_hash.rs @@ -30,7 +30,8 @@ pub fn generate_table<'cont, T, I: iter::Iterator, H: Fn(&T) -> hash_function: H, ) -> Vec> { let size = (1.20 * num_items as f64) as usize; - // TODO do we really need the multiply by two here? + + // Probing code's stop condition relies on the table having one vacant entry at least. let size = if size.is_power_of_two() { size * 2 } else {