Skip to content

Commit a1ec485

Browse files
committed
Cargo fmt
1 parent 6e064df commit a1ec485

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

crates/cli/src/subcommands/dns.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::E
4545

4646
let response = builder.send().await?;
4747
let status = &response.status();
48-
let result : SetDomainsResult = response.json_or_error().await?;
48+
let result: SetDomainsResult = response.json_or_error().await?;
4949

5050
if !status.is_success() {
5151
anyhow::bail!(match result {
5252
SetDomainsResult::Success => "".to_string(),
53-
SetDomainsResult::PermissionDenied { domain } =>
54-
format!("Permission denied for domain: {}", domain),
53+
SetDomainsResult::PermissionDenied { domain } => format!("Permission denied for domain: {}", domain),
5554
SetDomainsResult::PermissionDeniedOnAny { domains } =>
5655
format!("Permission denied for domains: {:?}", domains),
57-
SetDomainsResult::DatabaseNotFound =>
58-
format!("Database {} not found", database_identity),
59-
SetDomainsResult::NotYourDatabase { .. } =>
60-
format!("You cannot rename {} because it is owned by another identity.", database_identity),
56+
SetDomainsResult::DatabaseNotFound => format!("Database {} not found", database_identity),
57+
SetDomainsResult::NotYourDatabase { .. } => format!(
58+
"You cannot rename {} because it is owned by another identity.",
59+
database_identity
60+
),
6161
SetDomainsResult::OtherError(err) => err,
62-
});
62+
});
6363
}
6464

6565
println!("Name set to {} for identity {}.", domain, database_identity);

crates/client-api/src/routes/database.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,11 @@ pub async fn set_names<S: ControlStateDelegate>(
708708
if ctx.lookup_identity(name.as_str()).unwrap().is_some() {
709709
return Ok((
710710
StatusCode::BAD_REQUEST,
711-
axum::Json(name::SetDomainsResult::OtherError(
712-
format!("Cannot rename to {} because it already is in use.", name.as_str())))));
711+
axum::Json(name::SetDomainsResult::OtherError(format!(
712+
"Cannot rename to {} because it already is in use.",
713+
name.as_str()
714+
))),
715+
));
713716
}
714717
}
715718

0 commit comments

Comments
 (0)