Apply cargo fmt changes

This commit is contained in:
CodeMan62 2025-04-02 19:08:46 +05:30
parent fce0fa9c57
commit c2ff4dd3b2

View File

@ -212,14 +212,16 @@ async fn patch_network(
let merged = DbRemote { let merged = DbRemote {
url: match new_url { url: match new_url {
Setting::Set(new_url) => { Setting::Set(new_url) => {
if !new_url.starts_with("http://") && !new_url.starts_with("https://") { if !new_url.starts_with("http://")
&& !new_url.starts_with("https://")
{
return Err(ResponseError::from_msg( return Err(ResponseError::from_msg(
format!("in .remotes.{key}.url: error from Url::parse"), format!("in .remotes.{key}.url: error from Url::parse"),
meilisearch_types::error::Code::InvalidNetworkUrl, meilisearch_types::error::Code::InvalidNetworkUrl,
)); ));
} }
new_url new_url
}, }
Setting::Reset => { Setting::Reset => {
return Err(ResponseError::from_msg( return Err(ResponseError::from_msg(
format!( format!(