From fdaf45aab2e898b2f730ec81c2d469f055fe0452 Mon Sep 17 00:00:00 2001 From: ad hoc Date: Thu, 31 Mar 2022 18:42:10 +0200 Subject: [PATCH] replace hardcoded value with constant in TestContext --- milli/src/search/query_tree.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/milli/src/search/query_tree.rs b/milli/src/search/query_tree.rs index b1c846324..1bb4c9516 100644 --- a/milli/src/search/query_tree.rs +++ b/milli/src/search/query_tree.rs @@ -564,6 +564,8 @@ mod test { use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; + use crate::index::{DEFAULT_MIN_WORD_LEN_ONE_TYPO, DEFAULT_MIN_WORD_LEN_TWO_TYPOS}; + use super::*; #[derive(Debug)] @@ -602,7 +604,7 @@ mod test { } fn min_word_len_for_typo(&self) -> heed::Result<(u8, u8)> { - Ok((5, 9)) + Ok((DEFAULT_MIN_WORD_LEN_ONE_TYPO, DEFAULT_MIN_WORD_LEN_TWO_TYPOS)) } }