@@ -73,7 +73,7 @@ update_settings_1: |-
73
73
synonyms.insert(String::from("logan"), vec!["wolverine"]);
74
74
75
75
let settings = Settings::new()
76
- .with_ranking_rules(& [
76
+ .with_ranking_rules([
77
77
"typo",
78
78
"words",
79
79
"proximity",
@@ -82,24 +82,24 @@ update_settings_1: |-
82
82
"exactness",
83
83
"desc(release_date)",
84
84
"desc(rank)"
85
- ][..] )
85
+ ])
86
86
.with_distinct_attribute("movie_id")
87
- .with_searchable_attributes(& [
87
+ .with_searchable_attributes([
88
88
"title",
89
89
"description",
90
90
"genre"
91
- ][..] )
92
- .with_displayed_attributes(& [
91
+ ])
92
+ .with_displayed_attributes([
93
93
"title",
94
94
"description",
95
95
"genre",
96
96
"release_date"
97
- ][..] )
98
- .with_stop_words(& [
97
+ ])
98
+ .with_stop_words([
99
99
"the",
100
100
"a",
101
101
"an"
102
- ][..] )
102
+ ])
103
103
.with_synonyms(synonyms);
104
104
105
105
let progress: Progress = movies.set_settings(&settings).await.unwrap();
@@ -120,7 +120,7 @@ get_stop_words_1: |-
120
120
let stop_words: Vec<String> = movies.get_stop_words().await.unwrap();
121
121
update_stop_words_1 : |-
122
122
let stop_words = ["of", "the", "to"];
123
- let progress: Progress = movies.set_stop_words(&stop_words[..] ).await.unwrap();
123
+ let progress: Progress = movies.set_stop_words(&stop_words).await.unwrap();
124
124
reset_stop_words_1 : |-
125
125
let progress: Progress = movies.reset_stop_words().await.unwrap();
126
126
get_ranking_rules_1 : |-
@@ -137,7 +137,7 @@ update_ranking_rules_1: |-
137
137
"desc(rank)",
138
138
];
139
139
140
- let progress: Progress = movies.set_ranking_rules(&ranking_rules[..] ).await.unwrap();
140
+ let progress: Progress = movies.set_ranking_rules(&ranking_rules).await.unwrap();
141
141
reset_ranking_rules_1 : |-
142
142
let progress: Progress = movies.reset_ranking_rules().await.unwrap();
143
143
get_distinct_attribute_1 : |-
@@ -155,7 +155,7 @@ update_searchable_attributes_1: |-
155
155
"genre"
156
156
];
157
157
158
- let progress: Progress = movies.set_searchable_attributes(&searchable_attributes[..] ).await.unwrap();
158
+ let progress: Progress = movies.set_searchable_attributes(&searchable_attributes).await.unwrap();
159
159
reset_searchable_attributes_1 : |-
160
160
let progress: Progress = movies.reset_searchable_attributes().await.unwrap();
161
161
get_attributes_for_faceting_1 : |-
@@ -166,7 +166,7 @@ update_attributes_for_faceting_1: |-
166
166
"director"
167
167
];
168
168
169
- let progress: Progress = movies.set_attributes_for_faceting(&attributes_for_faceting[..] ).await.unwrap();
169
+ let progress: Progress = movies.set_attributes_for_faceting(&attributes_for_faceting).await.unwrap();
170
170
reset_attributes_for_faceting_1 : |-
171
171
let progress: Progress = movies.reset_attributes_for_faceting().await.unwrap();
172
172
get_displayed_attributes_1 : |-
@@ -179,7 +179,7 @@ update_displayed_attributes_1: |-
179
179
"release_date"
180
180
];
181
181
182
- let progress: Progress = movies.set_displayed_attributes(&displayed_attributes[..] ).await.unwrap();
182
+ let progress: Progress = movies.set_displayed_attributes(&displayed_attributes).await.unwrap();
183
183
reset_displayed_attributes_1 : |-
184
184
let progress: Progress = movies.reset_displayed_attributes().await.unwrap();
185
185
get_index_stats_1 : |-
@@ -201,7 +201,7 @@ field_properties_guide_searchable_1: |-
201
201
"genre"
202
202
];
203
203
204
- let progress: Progress = movies.set_searchable_attributes(&searchable_attributes[..] ).await.unwrap();
204
+ let progress: Progress = movies.set_searchable_attributes(&searchable_attributes).await.unwrap();
205
205
field_properties_guide_displayed_1 : |-
206
206
let displayed_attributes = [
207
207
"title",
@@ -210,7 +210,7 @@ field_properties_guide_displayed_1: |-
210
210
"release_date"
211
211
];
212
212
213
- let progress: Progress = movies.set_displayed_attributes(&displayed_attributes[..] ).await.unwrap();
213
+ let progress: Progress = movies.set_displayed_attributes(&displayed_attributes).await.unwrap();
214
214
filtering_guide_1 : |-
215
215
let results: SearchResults<Movie> = movies.search()
216
216
.with_query("Avengers")
@@ -321,9 +321,9 @@ settings_guide_synonyms_1: |-
321
321
let tops: Index = client.get_index("tops").await.unwrap();
322
322
let progress: Progress = tops.set_synonyms(&synonyms).await.unwrap();
323
323
settings_guide_stop_words_1 : |-
324
- let progress: Progress = movies.set_stop_words(& ["the", "a", "an"][.. ]).await.unwrap();
324
+ let progress: Progress = movies.set_stop_words(["the", "a", "an"]).await.unwrap();
325
325
settings_guide_attributes_for_faceting_1 : |-
326
- let progress: Progress = movies.set_attributes_for_faceting(& ["director", "genres"][.. ]).await.unwrap();
326
+ let progress: Progress = movies.set_attributes_for_faceting(["director", "genres"]).await.unwrap();
327
327
settings_guide_ranking_rules_1 : |-
328
328
let ranking_rules = [
329
329
"typo",
@@ -336,7 +336,7 @@ settings_guide_ranking_rules_1: |-
336
336
"desc(rank)",
337
337
];
338
338
339
- let progress: Progress = movies.set_ranking_rules(&ranking_rules[..] ).await.unwrap();
339
+ let progress: Progress = movies.set_ranking_rules(&ranking_rules).await.unwrap();
340
340
settings_guide_distinct_1 : |-
341
341
let jackets: Index = client.get_index("jackets").await.unwrap();
342
342
let progress: Progress = jackets.set_distinct_attribute("product_id").await.unwrap();
@@ -347,7 +347,7 @@ settings_guide_searchable_1: |-
347
347
"genre"
348
348
];
349
349
350
- let progress: Progress = movies.set_searchable_attributes(&searchable_attributes[..] ).await.unwrap();
350
+ let progress: Progress = movies.set_searchable_attributes(&searchable_attributes).await.unwrap();
351
351
settings_guide_displayed_1 : |-
352
352
let displayed_attributes = [
353
353
"title",
@@ -356,7 +356,7 @@ settings_guide_displayed_1: |-
356
356
"release_date"
357
357
];
358
358
359
- let progress: Progress = movies.set_displayed_attributes(&displayed_attributes[..] ).await.unwrap();
359
+ let progress: Progress = movies.set_displayed_attributes(&displayed_attributes).await.unwrap();
360
360
documents_guide_add_movie_1 : |-
361
361
// Define the type of our documents
362
362
#[derive(Serialize, Deserialize, Debug)]
@@ -500,7 +500,7 @@ getting_started_search_md: |-
500
500
501
501
[About this SDK](https://github.com/meilisearch/meilisearch-rust/)
502
502
faceted_search_update_settings_1 : |-
503
- let progress: Progress = movies.set_attributes_for_faceting(& ["director", "genres"][.. ]).await.unwrap();
503
+ let progress: Progress = movies.set_attributes_for_faceting(["director", "genres"]).await.unwrap();
504
504
faceted_search_facet_filters_1 : |-
505
505
let results: SearchResults<Movie> = movies.search()
506
506
.with_query("thriller")
@@ -524,7 +524,7 @@ faceted_search_walkthrough_attributes_for_faceting_1: |-
524
524
"production_companies"
525
525
];
526
526
527
- let progress: Progress = movies.set_attributes_for_faceting(&attributes_for_faceting[..] ).await.unwrap();
527
+ let progress: Progress = movies.set_attributes_for_faceting(&attributes_for_faceting).await.unwrap();
528
528
faceted_search_walkthrough_facet_filters_1 : |-
529
529
let results: SearchResults<Movie> = movies.search()
530
530
.with_query("thriller")
0 commit comments