Fix formatting and apply clippy suggestion

This commit is contained in:
Andrey "MOU" Larionov 2022-10-10 11:04:46 +02:00
parent 9dbc71cb6d
commit 343a677566
No known key found for this signature in database
GPG key ID: 5FF293FC94C01D6A
4 changed files with 28 additions and 17 deletions

View file

@ -190,7 +190,9 @@ impl Index<'_> {
pub async fn update_settings(&self, settings: Value) -> (Value, StatusCode) {
let url = format!("/indexes/{}/settings", urlencode(self.uid.as_ref()));
self.service.patch_encoded(url, settings, self.encoder).await
self.service
.patch_encoded(url, settings, self.encoder)
.await
}
pub async fn delete_settings(&self) -> (Value, StatusCode) {
@ -230,7 +232,11 @@ impl Index<'_> {
pub async fn search_get(&self, query: Value) -> (Value, StatusCode) {
let params = yaup::to_string(&query).unwrap();
let url = format!("/indexes/{}/search?{}", urlencode(self.uid.as_ref()), params);
let url = format!(
"/indexes/{}/search?{}",
urlencode(self.uid.as_ref()),
params
);
self.service.get(url).await
}