Skip to content

Commit 81c1a77

Browse files
committed
Update documentation
1 parent 154612b commit 81c1a77

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/settings.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use serde::{Deserialize, Serialize};
2-
use std::{collections::HashMap, convert, hash::Hash};
2+
use std::collections::HashMap;
33
use crate::{indexes::Index, errors::Error, request::{request, Method}, progress::{Progress, ProgressJson}};
44

55
/// Struct reprensenting a set of settings.
@@ -9,20 +9,20 @@ use crate::{indexes::Index, errors::Error, request::{request, Method}, progress:
99
///
1010
/// ```
1111
/// # use meilisearch_sdk::settings::Settings;
12-
/// let stop_words = vec![String::from("a"), String::from("the"), String::from("of")];
13-
///
1412
/// let settings = Settings::new()
15-
/// .with_stop_words(stop_words.clone());
13+
/// .with_stop_words(&["a", "the", "of"][..]);
1614
///
1715
/// // OR
1816
///
17+
/// let stop_words: Vec<String> = vec!["a".to_string(), "the".to_string(), "of".to_string()];
1918
/// let mut settings = Settings::new();
20-
/// settings.stop_words = Some(stop_words.clone());
19+
/// settings.stop_words = Some(stop_words);
2120
///
2221
/// // OR
2322
///
23+
/// let stop_words: Vec<String> = vec!["a".to_string(), "the".to_string(), "of".to_string()];
2424
/// let settings = Settings {
25-
/// stop_words: Some(stop_words.clone()),
25+
/// stop_words: Some(stop_words),
2626
/// ..Settings::new()
2727
/// };
2828
/// ```

0 commit comments

Comments
 (0)