diff --git a/src/lib.rs b/src/lib.rs index 7301ad4..7e50a29 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -245,7 +245,6 @@ #![forbid(unsafe_code)] #![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)] #![allow(clippy::module_name_repetitions)] - #![doc(html_favicon_url = "https://www.arkiteq.ca/crates/indicium/icon.png")] #![doc(html_logo_url = "https://www.arkiteq.ca/crates/indicium/logo.png")] diff --git a/src/simple/autocomplete/global.rs b/src/simple/autocomplete/global.rs index b60361f..4995cd5 100644 --- a/src/simple/autocomplete/global.rs +++ b/src/simple/autocomplete/global.rs @@ -3,7 +3,7 @@ use crate::simple::internal::string_keywords::SplitContext; use crate::simple::search_index::SearchIndex; use kstring::KString; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/autocomplete/keyword.rs b/src/simple/autocomplete/keyword.rs index ec63cc0..0e36b84 100644 --- a/src/simple/autocomplete/keyword.rs +++ b/src/simple/autocomplete/keyword.rs @@ -1,6 +1,6 @@ use crate::simple::search_index::SearchIndex; use kstring::KString; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/autocomplete/mod.rs b/src/simple/autocomplete/mod.rs index 6525787..af0ed27 100644 --- a/src/simple/autocomplete/mod.rs +++ b/src/simple/autocomplete/mod.rs @@ -5,7 +5,7 @@ mod keyword; // ----------------------------------------------------------------------------- use crate::simple::{AutocompleteType, SearchIndex}; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/builder.rs b/src/simple/builder.rs index d18f193..086f292 100644 --- a/src/simple/builder.rs +++ b/src/simple/builder.rs @@ -133,7 +133,8 @@ impl SearchIndexBuilder { /// /// [`StrsimMetric`]: enum.StrsimMetric.html #[cfg(feature = "strsim")] - #[must_use] pub const fn strsim_metric(mut self, strsim_metric: Option) -> Self { + #[must_use] + pub const fn strsim_metric(mut self, strsim_metric: Option) -> Self { self.strsim_metric = strsim_metric; self } // fn diff --git a/src/simple/default.rs b/src/simple/default.rs index 7bbc4db..0ea60f0 100644 --- a/src/simple/default.rs +++ b/src/simple/default.rs @@ -8,7 +8,6 @@ use crate::simple::{AutocompleteType, EddieMetric, SearchIndex, SearchType, Strs /// `SearchIndex::new()` or `SearchIndexBuilder`. impl Default for SearchIndex { - fn default() -> Self { Self::new( SearchType::Live, // Search type. diff --git a/src/simple/deref.rs b/src/simple/deref.rs index 7ce3c15..6eaca9d 100644 --- a/src/simple/deref.rs +++ b/src/simple/deref.rs @@ -1,7 +1,7 @@ use crate::simple::search_index::SearchIndex; use kstring::KString; use std::collections::{BTreeMap, BTreeSet}; -use std::{ops::Deref}; +use std::ops::Deref; // ----------------------------------------------------------------------------- // diff --git a/src/simple/deref_mut.rs b/src/simple/deref_mut.rs index ad47245..1bbfcbf 100644 --- a/src/simple/deref_mut.rs +++ b/src/simple/deref_mut.rs @@ -1,5 +1,5 @@ use crate::simple::search_index::SearchIndex; -use std::{ops::DerefMut}; +use std::ops::DerefMut; // ----------------------------------------------------------------------------- // diff --git a/src/simple/internal/eddie/eddie_autocomplete.rs b/src/simple/internal/eddie/eddie_autocomplete.rs index b1c231c..3b8894b 100644 --- a/src/simple/internal/eddie/eddie_autocomplete.rs +++ b/src/simple/internal/eddie/eddie_autocomplete.rs @@ -1,5 +1,5 @@ use crate::simple::search_index::SearchIndex; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/internal/eddie/eddie_global_keyword.rs b/src/simple/internal/eddie/eddie_global_keyword.rs index af89299..86c46e1 100644 --- a/src/simple/internal/eddie/eddie_global_keyword.rs +++ b/src/simple/internal/eddie/eddie_global_keyword.rs @@ -1,7 +1,7 @@ use crate::simple::search_index::SearchIndex; use crate::simple::EddieMetric; use kstring::KString; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/internal/eddie/eddie_keyword.rs b/src/simple/internal/eddie/eddie_keyword.rs index 1d822d9..e66b2d1 100644 --- a/src/simple/internal/eddie/eddie_keyword.rs +++ b/src/simple/internal/eddie/eddie_keyword.rs @@ -1,5 +1,5 @@ use crate::simple::search_index::SearchIndex; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/internal/search_top_scores/insert.rs b/src/simple/internal/search_top_scores/insert.rs index 41c3cc6..596a52a 100644 --- a/src/simple/internal/search_top_scores/insert.rs +++ b/src/simple/internal/search_top_scores/insert.rs @@ -1,5 +1,5 @@ use crate::simple::internal::SearchTopScores; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/internal/search_top_scores/mod.rs b/src/simple/internal/search_top_scores/mod.rs index 9fdf92b..ae48900 100644 --- a/src/simple/internal/search_top_scores/mod.rs +++ b/src/simple/internal/search_top_scores/mod.rs @@ -18,7 +18,7 @@ use ahash::HashMap; use std::collections::HashMap; // Static dependencies: -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- // diff --git a/src/simple/internal/search_top_scores/remove_bottom.rs b/src/simple/internal/search_top_scores/remove_bottom.rs index 393f92f..9012996 100644 --- a/src/simple/internal/search_top_scores/remove_bottom.rs +++ b/src/simple/internal/search_top_scores/remove_bottom.rs @@ -1,5 +1,5 @@ use crate::simple::internal::SearchTopScores; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/internal/search_top_scores/results.rs b/src/simple/internal/search_top_scores/results.rs index d17a9ae..0c5f47f 100644 --- a/src/simple/internal/search_top_scores/results.rs +++ b/src/simple/internal/search_top_scores/results.rs @@ -1,5 +1,5 @@ use crate::simple::internal::SearchTopScores; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/internal/search_top_scores/with_capacity.rs b/src/simple/internal/search_top_scores/with_capacity.rs index 33eb436..774ee71 100644 --- a/src/simple/internal/search_top_scores/with_capacity.rs +++ b/src/simple/internal/search_top_scores/with_capacity.rs @@ -8,7 +8,7 @@ use std::collections::HashMap; // Static dependencies: use crate::simple::internal::SearchTopScores; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/internal/strsim/strsim_autocomplete.rs b/src/simple/internal/strsim/strsim_autocomplete.rs index 5fac57c..f54683b 100644 --- a/src/simple/internal/strsim/strsim_autocomplete.rs +++ b/src/simple/internal/strsim/strsim_autocomplete.rs @@ -1,5 +1,5 @@ use crate::simple::search_index::SearchIndex; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- @@ -87,7 +87,8 @@ impl SearchIndex { /// ); /// ``` - #[must_use] pub fn strsim_autocomplete(&self, keyword: &str) -> Vec<&str> { + #[must_use] + pub fn strsim_autocomplete(&self, keyword: &str) -> Vec<&str> { // If case sensitivity set, leave case intact. Otherwise, normalize // keyword to lower case: let keyword = if self.case_sensitive { diff --git a/src/simple/internal/strsim/strsim_global_keyword.rs b/src/simple/internal/strsim/strsim_global_keyword.rs index a3012fc..ac33d41 100644 --- a/src/simple/internal/strsim/strsim_global_keyword.rs +++ b/src/simple/internal/strsim/strsim_global_keyword.rs @@ -1,7 +1,7 @@ use crate::simple::search_index::SearchIndex; use crate::simple::StrsimMetric; use kstring::KString; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/internal/strsim/strsim_keyword.rs b/src/simple/internal/strsim/strsim_keyword.rs index 1a3262e..bfc1aa8 100644 --- a/src/simple/internal/strsim/strsim_keyword.rs +++ b/src/simple/internal/strsim/strsim_keyword.rs @@ -1,5 +1,5 @@ use crate::simple::search_index::SearchIndex; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- @@ -82,7 +82,8 @@ impl SearchIndex { /// ); /// ``` - #[must_use] pub fn strsim_keyword(&self, keyword: &str) -> Option<&str> { + #[must_use] + pub fn strsim_keyword(&self, keyword: &str) -> Option<&str> { // If case sensitivity set, leave case intact. Otherwise, normalize // keyword to lower case: let keyword = if self.case_sensitive { diff --git a/src/simple/new.rs b/src/simple/new.rs index 202ec62..8e9b319 100644 --- a/src/simple/new.rs +++ b/src/simple/new.rs @@ -1,5 +1,5 @@ use crate::simple::{AutocompleteType, EddieMetric, SearchIndex, SearchType, StrsimMetric}; -use std::{collections::BTreeMap}; +use std::collections::BTreeMap; // ----------------------------------------------------------------------------- diff --git a/src/simple/search/keyword.rs b/src/simple/search/keyword.rs index b8bfd81..554a9ef 100644 --- a/src/simple/search/keyword.rs +++ b/src/simple/search/keyword.rs @@ -1,6 +1,6 @@ use crate::simple::search_index::SearchIndex; use kstring::KString; -use std::{hash::Hash}; +use std::hash::Hash; // ----------------------------------------------------------------------------- diff --git a/src/simple/search/mod.rs b/src/simple/search/mod.rs index a42f0ef..8df5dd8 100644 --- a/src/simple/search/mod.rs +++ b/src/simple/search/mod.rs @@ -6,7 +6,7 @@ mod or; // ----------------------------------------------------------------------------- use crate::simple::{SearchIndex, SearchType}; -use std::{hash::Hash}; +use std::hash::Hash; // -----------------------------------------------------------------------------