Skip to content

Commit 2bed778

Browse files
committed
cargo fmt cleanup
1 parent fb87427 commit 2bed778

File tree

10 files changed

+118
-118
lines changed

10 files changed

+118
-118
lines changed

src/client.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl Client {
4040
/// #
4141
/// let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
4242
/// let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
43-
///
43+
///
4444
/// let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY));
4545
/// ```
4646
pub fn new(host: impl Into<String>, api_key: Option<impl Into<String>>) -> Client {
@@ -665,7 +665,7 @@ impl Client {
665665
/// client.delete_key(key).await.unwrap();
666666
///
667667
/// let keys = client.get_keys().await.unwrap();
668-
///
668+
///
669669
/// assert!(keys.results.iter().all(|key| key.key != inner_key));
670670
/// # });
671671
/// ```
@@ -698,7 +698,7 @@ impl Client {
698698
/// key.with_name(&name);
699699
///
700700
/// let key = client.create_key(key).await.unwrap();
701-
///
701+
///
702702
/// assert_eq!(key.name, Some(name));
703703
/// # client.delete_key(key).await.unwrap();
704704
/// # });
@@ -733,12 +733,12 @@ impl Client {
733733
/// let new_key = KeyBuilder::new();
734734
/// let mut new_key = client.create_key(new_key).await.unwrap();
735735
/// let mut key_update = KeyUpdater::new(new_key);
736-
///
736+
///
737737
/// let name = "my name".to_string();
738738
/// key_update.with_name(&name);
739739
///
740740
/// let key = client.update_key(key_update).await.unwrap();
741-
///
741+
///
742742
/// assert_eq!(key.name, Some(name));
743743
/// # client.delete_key(key).await.unwrap();
744744
/// # });
@@ -784,7 +784,7 @@ impl Client {
784784
/// Wait until Meilisearch processes a [Task], and get its status.
785785
///
786786
/// `interval` = The frequency at which the server should be polled. **Default = 50ms**
787-
///
787+
///
788788
/// `timeout` = The maximum time to wait for processing to complete. **Default = 5000ms**
789789
///
790790
/// If the waited time exceeds `timeout` then an [Error::Timeout] will be returned.
@@ -869,7 +869,7 @@ impl Client {
869869
/// # let client = client::Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY));
870870
/// # let index = client.create_index("movies_get_task", None).await.unwrap().wait_for_completion(&client, None, None).await.unwrap().try_make_index(&client).unwrap();
871871
/// let task = index.delete_all_documents().await.unwrap();
872-
///
872+
///
873873
/// let task = client.get_task(task).await.unwrap();
874874
/// # index.delete().await.unwrap().wait_for_completion(&client, None, None).await.unwrap();
875875
/// # });
@@ -898,7 +898,7 @@ impl Client {
898898
/// # let client = client::Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY));
899899
/// let mut query = tasks::TasksSearchQuery::new(&client);
900900
/// query.with_index_uids(["get_tasks_with"]);
901-
///
901+
///
902902
/// let tasks = client.get_tasks_with(&query).await.unwrap();
903903
/// # });
904904
/// ```

src/documents.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl<'a> DocumentQuery<'a> {
131131
/// id: String,
132132
/// kind: String,
133133
/// }
134-
///
134+
///
135135
/// #[derive(Debug, Serialize, Deserialize, PartialEq)]
136136
/// struct MyObjectReduced {
137137
/// id: String,
@@ -164,7 +164,7 @@ pub struct DocumentsQuery<'a> {
164164
pub index: &'a Index,
165165

166166
/// The number of documents to skip.
167-
///
167+
///
168168
/// If the value of the parameter `offset` is `n`, the `n` first documents will not be returned.
169169
/// This is helpful for pagination.
170170
///
@@ -177,7 +177,7 @@ pub struct DocumentsQuery<'a> {
177177
/// This is helpful for pagination.
178178
///
179179
/// Example: If you don't want to get more than two documents, set limit to `2`.
180-
///
180+
///
181181
/// **Default: `20`**
182182
#[serde(skip_serializing_if = "Option::is_none")]
183183
pub limit: Option<usize>,

src/dumps.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! The `dumps` module allows the creation of database dumps.
2-
//!
2+
//!
33
//! - Dumps are `.dump` files that can be used to launch Meilisearch.
4-
//!
4+
//!
55
//! - Dumps are compatible between Meilisearch versions.
66
//!
77
//! - Creating a dump is also referred to as exporting it, whereas launching Meilisearch with a dump is referred to as importing it.
@@ -45,7 +45,7 @@ use crate::{client::Client, errors::Error, request::*, task_info::TaskInfo};
4545
/// See the [dumps](crate::dumps) module.
4646
impl Client {
4747
/// Triggers a dump creation process.
48-
///
48+
///
4949
/// Once the process is complete, a dump is created in the [dumps directory](https://docs.meilisearch.com/reference/features/configuration.html#dumps-destination).
5050
/// If the dumps directory does not exist yet, it will be created.
5151
///
@@ -63,7 +63,7 @@ impl Client {
6363
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY));
6464
/// #
6565
/// let task_info = client.create_dump().await.unwrap();
66-
///
66+
///
6767
/// assert!(matches!(
6868
/// task_info,
6969
/// TaskInfo {

src/errors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use thiserror::Error;
77
#[non_exhaustive]
88
pub enum Error {
99
/// The exhaustive list of Meilisearch errors: <https://github.com/meilisearch/specifications/blob/main/text/0061-error-format-and-definitions.md>
10-
///
10+
///
1111
/// Also check out: <https://github.com/meilisearch/Meilisearch/blob/main/meilisearch-error/src/lib.rs>
1212
#[error(transparent)]
1313
Meilisearch(#[from] MeilisearchError),
@@ -22,7 +22,7 @@ pub enum Error {
2222
#[error("A task did not succeed in time.")]
2323
Timeout,
2424
/// This Meilisearch SDK generated an invalid request (which was not sent).
25-
///
25+
///
2626
/// It probably comes from an invalid API key resulting in an invalid HTTP header.
2727
#[error("Unable to generate a valid HTTP request. It probably comes from an invalid API key.")]
2828
InvalidRequest,
@@ -31,7 +31,7 @@ pub enum Error {
3131
#[error("You need to provide an api key to use the `{0}` method.")]
3232
CantUseWithoutApiKey(String),
3333
/// It is not possible to generate a tenant token with a invalid api key.
34-
///
34+
///
3535
/// Empty strings or with less than 8 characters are considered invalid.
3636
#[error("The provided api_key is invalid.")]
3737
TenantTokensInvalidApiKey,

0 commit comments

Comments
 (0)