Skip to content

Commit 699c6a0

Browse files
fmt
1 parent 01bcdf5 commit 699c6a0

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

meilisearch-index-setting-macro/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,10 @@ fn get_index_config_implementation(
125125
get_settings_token_for_list(&filterable_attributes, "with_filterable_attributes");
126126
let searchable_attr_tokens =
127127
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+
);
130132

131133
quote! {
132134
#[::meilisearch_sdk::macro_helper::async_trait(?Send)]

src/settings.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,19 +217,18 @@ impl Settings {
217217
}
218218

219219
#[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 {
221221
if let Some(distinct_attribute) = distinct_attribute {
222-
Settings {
222+
Settings {
223223
distinct_attribute: Some(Some(distinct_attribute.as_ref().to_string())),
224224
..self
225-
}
226-
} else {
227-
Settings {
225+
}
226+
} else {
227+
Settings {
228228
distinct_attribute: Some(None),
229229
..self
230-
}
231-
232-
}
230+
}
231+
}
233232
}
234233

235234
#[must_use]

0 commit comments

Comments
 (0)