Skip to content

Commit d489045

Browse files
committed
style: cargo fmt
1 parent 2d75e9d commit d489045

6 files changed

Lines changed: 28 additions & 14 deletions

File tree

crates/hm-plugin-cloud/src/verbs/job.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ async fn show(client: &Client, org: &str, pipe: &str, build: i64, jid: &str) ->
5656
"/organizations/{org}/pipelines/{pipe}/builds/{build}/jobs/{jid}"
5757
))
5858
.await?;
59-
tracing::info!(
60-
"{}",
61-
serde_json::to_string_pretty(&j).unwrap_or_default()
62-
);
59+
tracing::info!("{}", serde_json::to_string_pretty(&j).unwrap_or_default());
6360
Ok(())
6461
}
6562

crates/hm/src/commands/dev/exec.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ pub async fn handle(args: DevExecArgs, _ctx: RunContext) -> Result<i32> {
4242
if matches.is_empty() {
4343
tracing::error!(
4444
"hm: slug `{}` is not running in this worktree.\n → run `hm dev up {}` first.",
45-
args.slug, args.slug,
45+
args.slug,
46+
args.slug,
4647
);
4748
return Ok(4);
4849
}

crates/hm/src/commands/dev/logs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ pub async fn handle(args: DevLogsArgs, _ctx: RunContext) -> Result<i32> {
4545
if matches.is_empty() {
4646
tracing::error!(
4747
"hm: slug `{}` is not running in this worktree.\n → run `hm dev up {}` first.",
48-
args.slug, args.slug,
48+
args.slug,
49+
args.slug,
4950
);
5051
return Ok(4);
5152
}

crates/hm/src/commands/dev/ls.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ pub async fn handle(_ctx: RunContext) -> Result<i32> {
2626

2727
tracing::info!(
2828
"{:<10} {:<8} {:<10} {:<10} PORTS",
29-
"SLUG", "DRIVER", "SESSION", "STATUS"
29+
"SLUG",
30+
"DRIVER",
31+
"SESSION",
32+
"STATUS"
3033
);
3134

3235
// Pre-load running containers by (slug, session) key.
@@ -59,21 +62,27 @@ pub async fn handle(_ctx: RunContext) -> Result<i32> {
5962
let ports_s = format_ports(ports);
6063
tracing::info!(
6164
"{slug:<10} {:<8} {:<10} {:<10} {ports_s}",
62-
"local", sess, state
65+
"local",
66+
sess,
67+
state
6368
);
6469
}
6570
}
6671
if !matched {
6772
tracing::info!(
6873
"{slug:<10} {:<8} {:<10} {:<10} \u{2014}",
69-
"local", "\u{2014}", "registered"
74+
"local",
75+
"\u{2014}",
76+
"registered"
7077
);
7178
}
7279
}
7380
RegEntry::Unhandled => {
7481
tracing::info!(
7582
"{slug:<10} {:<8} {:<10} {:<10} (no local driver)",
76-
"?", "\u{2014}", "registered"
83+
"?",
84+
"\u{2014}",
85+
"registered"
7786
);
7887
}
7988
}

crates/hm/src/commands/dev/port_of.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ pub async fn handle(args: DevPortOfArgs, _ctx: RunContext) -> Result<i32> {
4848
Ok(reg) if reg.deployments.contains_key(&args.slug) => {
4949
tracing::error!(
5050
"hm: slug `{}` registered but not running in this worktree.\n → run `hm dev up {}` first.",
51-
args.slug, args.slug,
51+
args.slug,
52+
args.slug,
5253
);
5354
return Ok(4);
5455
}
@@ -62,7 +63,10 @@ pub async fn handle(args: DevPortOfArgs, _ctx: RunContext) -> Result<i32> {
6263
}
6364
}
6465
if matches.len() > 1 {
65-
tracing::error!("hm: slug `{}` matches multiple live sessions in this worktree:", args.slug);
66+
tracing::error!(
67+
"hm: slug `{}` matches multiple live sessions in this worktree:",
68+
args.slug
69+
);
6670
for (_, sess, ports) in &matches {
6771
let p = format_ports(ports);
6872
tracing::error!(" {sess} {p}");
@@ -75,7 +79,8 @@ pub async fn handle(args: DevPortOfArgs, _ctx: RunContext) -> Result<i32> {
7579
let Some(host_port) = ports.get(&args.container_port) else {
7680
tracing::error!(
7781
"hm: container port `{}` is not published by `{}`.\n → check the deployment's port_mapping.",
78-
args.container_port, args.slug,
82+
args.container_port,
83+
args.slug,
7984
);
8085
return Ok(5);
8186
};

crates/hm/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ async fn main() {
1717
let args = Cli::parse();
1818

1919
let default_level = if args.verbose { "debug" } else { "info" };
20-
let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new(default_level));
20+
let filter =
21+
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new(default_level));
2122

2223
tracing_subscriber::fmt()
2324
.with_env_filter(filter)

0 commit comments

Comments
 (0)