mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Fix some of the edition 2024 warnings
This commit is contained in:
parent
2762d5a32a
commit
aa87064a13
82 changed files with 323 additions and 317 deletions
|
@ -8,7 +8,7 @@ use Criterion::*;
|
|||
use crate::search::{self, EXTERNAL_DOCUMENTS_IDS};
|
||||
|
||||
macro_rules! test_distinct {
|
||||
($func:ident, $distinct:ident, $exhaustive:ident, $limit:expr, $offset:expr, $criteria:expr, $n_res:expr) => {
|
||||
($func:ident, $distinct:ident, $exhaustive:ident, $limit:expr, $offset:expr_2021, $criteria:expr_2021, $n_res:expr_2021) => {
|
||||
#[test]
|
||||
fn $func() {
|
||||
let criteria = $criteria;
|
||||
|
|
|
@ -5,7 +5,7 @@ use Criterion::*;
|
|||
use crate::search::{self, EXTERNAL_DOCUMENTS_IDS};
|
||||
|
||||
macro_rules! test_filter {
|
||||
($func:ident, $filter:expr) => {
|
||||
($func:ident, $filter:expr_2021) => {
|
||||
#[test]
|
||||
fn $func() {
|
||||
let criteria = vec![Words, Typo, Proximity, Attribute, Exactness];
|
||||
|
|
|
@ -220,11 +220,11 @@ fn execute_filter(filter: &str, document: &TestDocument) -> Option<String> {
|
|||
id = Some(document.id.clone())
|
||||
}
|
||||
} else if let Some(("asc_desc_rank", filter)) = filter.split_once('<') {
|
||||
if document.asc_desc_rank < filter.parse().unwrap() {
|
||||
if document.asc_desc_rank < filter.parse::<u32>().unwrap() {
|
||||
id = Some(document.id.clone())
|
||||
}
|
||||
} else if let Some(("asc_desc_rank", filter)) = filter.split_once('>') {
|
||||
if document.asc_desc_rank > filter.parse().unwrap() {
|
||||
if document.asc_desc_rank > filter.parse::<u32>().unwrap() {
|
||||
id = Some(document.id.clone())
|
||||
}
|
||||
} else if filter.starts_with("_geoRadius") {
|
||||
|
|
|
@ -20,7 +20,7 @@ const DISALLOW_OPTIONAL_WORDS: TermsMatchingStrategy = TermsMatchingStrategy::Al
|
|||
const ASC_DESC_CANDIDATES_THRESHOLD: usize = 1000;
|
||||
|
||||
macro_rules! test_criterion {
|
||||
($func:ident, $optional_word:ident, $criteria:expr, $sort_criteria:expr) => {
|
||||
($func:ident, $optional_word:ident, $criteria:expr_2021, $sort_criteria:expr_2021) => {
|
||||
#[test]
|
||||
fn $func() {
|
||||
let criteria = $criteria;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue