mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-28 09:11:00 +00:00
Execute cargo clippy --fix
This commit is contained in:
@ -641,7 +641,7 @@ mod tests {
|
||||
external_ids: &[&str],
|
||||
disable_soft_deletion: bool,
|
||||
) -> Vec<u32> {
|
||||
let external_document_ids = index.external_documents_ids(&wtxn).unwrap();
|
||||
let external_document_ids = index.external_documents_ids(wtxn).unwrap();
|
||||
let ids_to_delete: Vec<u32> = external_ids
|
||||
.iter()
|
||||
.map(|id| external_document_ids.get(id.as_bytes()).unwrap())
|
||||
@ -858,7 +858,7 @@ mod tests {
|
||||
assert!(!results.documents_ids.is_empty());
|
||||
for id in results.documents_ids.iter() {
|
||||
assert!(
|
||||
!deleted_internal_ids.contains(&id),
|
||||
!deleted_internal_ids.contains(id),
|
||||
"The document {} was supposed to be deleted",
|
||||
id
|
||||
);
|
||||
@ -922,7 +922,7 @@ mod tests {
|
||||
assert!(!results.documents_ids.is_empty());
|
||||
for id in results.documents_ids.iter() {
|
||||
assert!(
|
||||
!deleted_internal_ids.contains(&id),
|
||||
!deleted_internal_ids.contains(id),
|
||||
"The document {} was supposed to be deleted",
|
||||
id
|
||||
);
|
||||
@ -986,7 +986,7 @@ mod tests {
|
||||
assert!(!results.documents_ids.is_empty());
|
||||
for id in results.documents_ids.iter() {
|
||||
assert!(
|
||||
!deleted_internal_ids.contains(&id),
|
||||
!deleted_internal_ids.contains(id),
|
||||
"The document {} was supposed to be deleted",
|
||||
id
|
||||
);
|
||||
|
@ -772,7 +772,7 @@ mod tests {
|
||||
|
||||
let docs = index.documents(&rtxn, vec![0, 1, 2]).unwrap();
|
||||
let (_id, obkv) = docs.iter().find(|(_id, kv)| kv.get(0) == Some(br#""kevin""#)).unwrap();
|
||||
let kevin_uuid: String = serde_json::from_slice(&obkv.get(1).unwrap()).unwrap();
|
||||
let kevin_uuid: String = serde_json::from_slice(obkv.get(1).unwrap()).unwrap();
|
||||
drop(rtxn);
|
||||
|
||||
// Second we send 1 document with the generated uuid, to erase the previous ones.
|
||||
@ -1811,7 +1811,7 @@ mod tests {
|
||||
let long_word = "lol".repeat(1000);
|
||||
let doc1 = documents! {[{
|
||||
"id": "1",
|
||||
"title": long_word.clone(),
|
||||
"title": long_word,
|
||||
}]};
|
||||
|
||||
index.add_documents(doc1).unwrap();
|
||||
|
@ -574,7 +574,7 @@ mod tests {
|
||||
expected_prefixes: &[&str],
|
||||
) {
|
||||
let mut actual_prefixes = vec![];
|
||||
trie.for_each_prefix_of(word.as_bytes(), &mut Vec::new(), &search_start, |x| {
|
||||
trie.for_each_prefix_of(word.as_bytes(), &mut Vec::new(), search_start, |x| {
|
||||
let s = String::from_utf8(x.to_owned()).unwrap();
|
||||
actual_prefixes.push(s);
|
||||
});
|
||||
|
Reference in New Issue
Block a user