File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
meilisearch-index-setting-macro/src Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,10 @@ fn get_index_config_implementation(
125
125
get_settings_token_for_list ( & filterable_attributes, "with_filterable_attributes" ) ;
126
126
let searchable_attr_tokens =
127
127
get_settings_token_for_list ( & searchable_attributes, "with_searchable_attributes" ) ;
128
- let distinct_attr_token =
129
- get_settings_token_for_string_for_some_string ( & distinct_key_attribute, "with_distinct_attribute" ) ;
128
+ let distinct_attr_token = get_settings_token_for_string_for_some_string (
129
+ & distinct_key_attribute,
130
+ "with_distinct_attribute" ,
131
+ ) ;
130
132
131
133
quote ! {
132
134
#[ :: meilisearch_sdk:: macro_helper:: async_trait( ?Send ) ]
Original file line number Diff line number Diff line change @@ -217,19 +217,18 @@ impl Settings {
217
217
}
218
218
219
219
#[ must_use]
220
- pub fn with_distinct_attribute ( self , distinct_attribute : Option < impl AsRef < str > > ) -> Settings {
220
+ pub fn with_distinct_attribute ( self , distinct_attribute : Option < impl AsRef < str > > ) -> Settings {
221
221
if let Some ( distinct_attribute) = distinct_attribute {
222
- Settings {
222
+ Settings {
223
223
distinct_attribute : Some ( Some ( distinct_attribute. as_ref ( ) . to_string ( ) ) ) ,
224
224
..self
225
- }
226
- } else {
227
- Settings {
225
+ }
226
+ } else {
227
+ Settings {
228
228
distinct_attribute : Some ( None ) ,
229
229
..self
230
- }
231
-
232
- }
230
+ }
231
+ }
233
232
}
234
233
235
234
#[ must_use]
You can’t perform that action at this time.
0 commit comments