Skip to content

Commit

Permalink
chore: fix lint issues with cargo fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
ayys committed Dec 16, 2024
1 parent 19e8cf8 commit 73122f1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
15 changes: 13 additions & 2 deletions lib/cli/src/commands/app/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,20 @@ impl AsyncCliCommand for CmdAppDeploy {
let app = &opts.app;

let pretty_name = if let Some(owner) = &owner {
format!("{} ({})", app.name.as_ref().context("App name has to be specified")?.bold(), owner.bold())
format!(
"{} ({})",
app.name
.as_ref()
.context("App name has to be specified")?
.bold(),
owner.bold()
)
} else {
app.name.as_ref().context("App name has to be specified")?.bold().to_string()
app.name
.as_ref()
.context("App name has to be specified")?
.bold()
.to_string()
};

if !self.quiet {
Expand Down
15 changes: 12 additions & 3 deletions lib/cli/src/commands/app/secrets/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,15 @@ pub(super) async fn get_app_id(
let (app, _) = r;

let app_name = if let Some(owner) = &app.owner {
format!("{owner}/{}", &app.name.clone().context("App name has to be specified")?)
format!(
"{owner}/{}",
&app.name.clone().context("App name has to be specified")?
)
} else {
app.name.clone().context("App name has to be specified")?.to_string()
app.name
.clone()
.context("App name has to be specified")?
.to_string()
};

let id = if let Some(id) = &app.app_id {
Expand Down Expand Up @@ -143,7 +149,10 @@ pub(super) async fn get_app_id(
app.name.context("App name has to be specified")?.bold()
);
} else {
eprintln!("Managing secrets related to app {}.", app.name.context("App name has to be specified")?.bold());
eprintln!(
"Managing secrets related to app {}.",
app.name.context("App name has to be specified")?.bold()
);
}
}
return Ok(id);
Expand Down
5 changes: 4 additions & 1 deletion lib/cli/src/commands/app/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ impl AppIdentOpts {
let ident = if let Some(id) = &config.app_id {
AppIdent::AppId(id.clone())
} else if let Some(owner) = &config.owner {
AppIdent::NamespacedName(owner.clone(), config.name.clone().context("App name was not specified")?)
AppIdent::NamespacedName(
owner.clone(),
config.name.clone().context("App name was not specified")?,
)
} else {
AppIdent::Name(config.name.clone().context("App name was not specified")?)
};
Expand Down

0 comments on commit 73122f1

Please sign in to comment.