From 0ef6e53c0f799bff54298f0b95ff58aa0c6a094e Mon Sep 17 00:00:00 2001 From: Riccardo Mazzarini Date: Wed, 15 Nov 2023 19:52:57 +0100 Subject: [PATCH] add `into-score` feature for converting distances into scores --- Cargo.toml | 1 + src/algos/fzf/distance.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 31c20c3..4b7f298 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ fzf-v2 = ["fzf-v1"] # Private features. bench = ["tests"] +into-score = [] tests = ["fzf-v1", "fzf-v2"] [dependencies] diff --git a/src/algos/fzf/distance.rs b/src/algos/fzf/distance.rs index e77a5ea..dbd0dcb 100644 --- a/src/algos/fzf/distance.rs +++ b/src/algos/fzf/distance.rs @@ -37,7 +37,7 @@ impl FzfDistance { } /// TODO: docs - #[cfg(feature = "tests")] + #[cfg(any(feature = "into-score", feature = "tests"))] #[inline(always)] pub fn into_score(self) -> Score { self.0