Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
leontoeides committed Mar 29, 2024
1 parent 6fd19bf commit 3ffd699
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 24 deletions.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

Expand Down
2 changes: 1 addition & 1 deletion src/simple/autocomplete/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/autocomplete/keyword.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::simple::search_index::SearchIndex;
use kstring::KString;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/autocomplete/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod keyword;
// -----------------------------------------------------------------------------

use crate::simple::{AutocompleteType, SearchIndex};
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down
3 changes: 2 additions & 1 deletion src/simple/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ impl<K: Clone + Ord> SearchIndexBuilder<K> {
///
/// [`StrsimMetric`]: enum.StrsimMetric.html
#[cfg(feature = "strsim")]
#[must_use] pub const fn strsim_metric(mut self, strsim_metric: Option<StrsimMetric>) -> Self {
#[must_use]
pub const fn strsim_metric(mut self, strsim_metric: Option<StrsimMetric>) -> Self {
self.strsim_metric = strsim_metric;
self
} // fn
Expand Down
1 change: 0 additions & 1 deletion src/simple/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use crate::simple::{AutocompleteType, EddieMetric, SearchIndex, SearchType, Strs
/// `SearchIndex::new()` or `SearchIndexBuilder`.

impl<K: Ord> Default for SearchIndex<K> {

fn default() -> Self {
Self::new(
SearchType::Live, // Search type.
Expand Down
2 changes: 1 addition & 1 deletion src/simple/deref.rs
Original file line number Diff line number Diff line change
@@ -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;

// -----------------------------------------------------------------------------
//
Expand Down
2 changes: 1 addition & 1 deletion src/simple/deref_mut.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::simple::search_index::SearchIndex;
use std::{ops::DerefMut};
use std::ops::DerefMut;

// -----------------------------------------------------------------------------
//
Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/eddie/eddie_autocomplete.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::simple::search_index::SearchIndex;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/eddie/eddie_global_keyword.rs
Original file line number Diff line number Diff line change
@@ -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;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/eddie/eddie_keyword.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::simple::search_index::SearchIndex;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/search_top_scores/insert.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::simple::internal::SearchTopScores;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/search_top_scores/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use ahash::HashMap;
use std::collections::HashMap;

// Static dependencies:
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------
//
Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/search_top_scores/remove_bottom.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::simple::internal::SearchTopScores;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/search_top_scores/results.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::simple::internal::SearchTopScores;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/search_top_scores/with_capacity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::collections::HashMap;

// Static dependencies:
use crate::simple::internal::SearchTopScores;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down
5 changes: 3 additions & 2 deletions src/simple/internal/strsim/strsim_autocomplete.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::simple::search_index::SearchIndex;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down Expand Up @@ -87,7 +87,8 @@ impl<K: Hash + Ord> SearchIndex<K> {
/// );
/// ```

#[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 {
Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/strsim/strsim_global_keyword.rs
Original file line number Diff line number Diff line change
@@ -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;

// -----------------------------------------------------------------------------

Expand Down
5 changes: 3 additions & 2 deletions src/simple/internal/strsim/strsim_keyword.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::simple::search_index::SearchIndex;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down Expand Up @@ -82,7 +82,8 @@ impl<K: Hash + Ord> SearchIndex<K> {
/// );
/// ```

#[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 {
Expand Down
2 changes: 1 addition & 1 deletion src/simple/new.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::simple::{AutocompleteType, EddieMetric, SearchIndex, SearchType, StrsimMetric};
use std::{collections::BTreeMap};
use std::collections::BTreeMap;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/search/keyword.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::simple::search_index::SearchIndex;
use kstring::KString;
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/simple/search/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod or;
// -----------------------------------------------------------------------------

use crate::simple::{SearchIndex, SearchType};
use std::{hash::Hash};
use std::hash::Hash;

// -----------------------------------------------------------------------------

Expand Down

0 comments on commit 3ffd699

Please sign in to comment.