meilisearch/meilisearch-rust

with_distrinct_attribute should accept `None` as a value.

bidoubiwa opened this issue · 0 comments

Description
Currently with_distinct_attribute does not accept None as a value. Meaning that once you have set one distinct attribute you need to either user reset_distinct_attribute or create an empty string as value.

pub fn with_distinct_attribute(self, distinct_attribute: impl AsRef<str>) -> Settings {
Settings {
distinct_attribute: Some(distinct_attribute.as_ref().to_string()),
..self
}
}

Expected behavior
None should be a valid type

Current behavior
It is not