@@ -82,8 +82,7 @@ pub struct Settings {
8282#[ allow( missing_docs) ]
8383impl Settings {
8484 /// Create undefined settings.
85- #[ must_use]
86- pub fn new ( ) -> Self {
85+ pub fn new ( ) -> Settings {
8786 Self {
8887 synonyms : None ,
8988 stop_words : None ,
@@ -98,8 +97,7 @@ impl Settings {
9897 }
9998 }
10099
101- #[ must_use]
102- pub fn with_synonyms < S , U , V > ( self , synonyms : HashMap < S , U > ) -> Self
100+ pub fn with_synonyms < S , U , V > ( self , synonyms : HashMap < S , U > ) -> Settings
103101 where
104102 S : AsRef < str > ,
105103 V : AsRef < str > ,
@@ -121,8 +119,7 @@ impl Settings {
121119 }
122120 }
123121
124- #[ must_use]
125- pub fn with_stop_words ( self , stop_words : impl IntoIterator < Item = impl AsRef < str > > ) -> Self {
122+ pub fn with_stop_words ( self , stop_words : impl IntoIterator < Item = impl AsRef < str > > ) -> Settings {
126123 Self {
127124 stop_words : Some (
128125 stop_words
@@ -134,19 +131,17 @@ impl Settings {
134131 }
135132 }
136133
137- #[ must_use]
138- pub fn with_pagination ( self , pagination_settings : PaginationSetting ) -> Self {
134+ pub fn with_pagination ( self , pagination_settings : PaginationSetting ) -> Settings {
139135 Self {
140136 pagination : Some ( pagination_settings) ,
141137 ..self
142138 }
143139 }
144140
145- #[ must_use]
146141 pub fn with_ranking_rules (
147142 self ,
148143 ranking_rules : impl IntoIterator < Item = impl AsRef < str > > ,
149- ) -> Self {
144+ ) -> Settings {
150145 Self {
151146 ranking_rules : Some (
152147 ranking_rules
@@ -158,11 +153,10 @@ impl Settings {
158153 }
159154 }
160155
161- #[ must_use]
162156 pub fn with_filterable_attributes (
163157 self ,
164158 filterable_attributes : impl IntoIterator < Item = impl AsRef < str > > ,
165- ) -> Self {
159+ ) -> Settings {
166160 Self {
167161 filterable_attributes : Some (
168162 filterable_attributes
@@ -174,11 +168,10 @@ impl Settings {
174168 }
175169 }
176170
177- #[ must_use]
178171 pub fn with_sortable_attributes (
179172 self ,
180173 sortable_attributes : impl IntoIterator < Item = impl AsRef < str > > ,
181- ) -> Self {
174+ ) -> Settings {
182175 Self {
183176 sortable_attributes : Some (
184177 sortable_attributes
@@ -190,19 +183,17 @@ impl Settings {
190183 }
191184 }
192185
193- #[ must_use]
194- pub fn with_distinct_attribute ( self , distinct_attribute : impl AsRef < str > ) -> Self {
186+ pub fn with_distinct_attribute ( self , distinct_attribute : impl AsRef < str > ) -> Settings {
195187 Self {
196188 distinct_attribute : Some ( distinct_attribute. as_ref ( ) . to_string ( ) ) ,
197189 ..self
198190 }
199191 }
200192
201- #[ must_use]
202193 pub fn with_searchable_attributes (
203194 self ,
204195 searchable_attributes : impl IntoIterator < Item = impl AsRef < str > > ,
205- ) -> Self {
196+ ) -> Settings {
206197 Self {
207198 searchable_attributes : Some (
208199 searchable_attributes
@@ -214,11 +205,10 @@ impl Settings {
214205 }
215206 }
216207
217- #[ must_use]
218208 pub fn with_displayed_attributes (
219209 self ,
220210 displayed_attributes : impl IntoIterator < Item = impl AsRef < str > > ,
221- ) -> Self {
211+ ) -> Settings {
222212 Self {
223213 displayed_attributes : Some (
224214 displayed_attributes
@@ -230,8 +220,7 @@ impl Settings {
230220 }
231221 }
232222
233- #[ must_use]
234- pub fn with_faceting ( self , faceting : & FacetingSettings ) -> Self {
223+ pub fn with_faceting ( self , faceting : & FacetingSettings ) -> Settings {
235224 Self {
236225 faceting : Some ( * faceting) ,
237226 ..self
0 commit comments