From ac202e84ab1b4ac88ad18658654265964db7822c Mon Sep 17 00:00:00 2001 From: Riccardo Mazzarini Date: Sun, 5 Nov 2023 17:59:39 +0100 Subject: [PATCH] fzf: tweaks --- src/algos/fzf/parser.rs | 6 +++--- src/algos/fzf/v1.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/algos/fzf/parser.rs b/src/algos/fzf/parser.rs index 362d0a2..6d99ab9 100644 --- a/src/algos/fzf/parser.rs +++ b/src/algos/fzf/parser.rs @@ -283,7 +283,7 @@ fn strip_leading_spaces(s: &str) -> &str { } /// TODO: docs -#[cfg(debug_assertions)] +#[cfg(feature = "tests")] #[doc(hidden)] pub fn parse(s: &str) -> FzfQuery<'static> { let parser = Box::leak(Box::new(FzfParser::new())); @@ -322,7 +322,7 @@ mod parse_tests { } } -#[cfg(debug_assertions)] +#[cfg(feature = "tests")] #[doc(hidden)] pub fn or_blocks(s: &str) -> impl Iterator> { let mut buf = Vec::new(); @@ -385,7 +385,7 @@ mod or_blocks_tests { } } -#[cfg(debug_assertions)] +#[cfg(feature = "tests")] #[doc(hidden)] pub fn words(s: &str) -> impl Iterator { let mut buf = Vec::new(); diff --git a/src/algos/fzf/v1.rs b/src/algos/fzf/v1.rs index 19ed61b..a7d3f4d 100644 --- a/src/algos/fzf/v1.rs +++ b/src/algos/fzf/v1.rs @@ -4,8 +4,8 @@ use super::{query::*, *}; use crate::*; /// TODO: docs -#[cfg_attr(docsrs, doc(cfg(any(feature = "fzf-v1", feature = "fzf-v2"))))] -#[derive(Default)] +#[cfg_attr(docsrs, doc(cfg(feature = "fzf-v1")))] +#[derive(Clone, Default)] pub struct FzfV1 { /// TODO: docs case_sensitivity: CaseSensitivity,