Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
B-2U authored Apr 17, 2024
1 parent c99bc65 commit bc04729
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/structs/ships_para.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl ShipsPara {

/// literal matching
pub fn normal_search_name(&self, input: &str, len_limit: usize) -> Option<Vec<Ship>> {
let input = unidecode(input.to_lowercase());
let input = unidecode(&input.to_lowercase());
let candidates: Vec<_> = self
.0
.values()
Expand Down Expand Up @@ -84,7 +84,7 @@ impl ShipsPara {
.filter(|ship| ship.is_available())
.filter_map(|ship| {
matcher
.fuzzy_match(&unidecode(&ship.name), unidecode(input))
.fuzzy_match(&unidecode(&ship.name), &unidecode(input))
.map(|score| (score, ship))
})
.sorted_by(|a, b| Ord::cmp(&b.0, &a.0))
Expand Down

0 comments on commit bc04729

Please sign in to comment.