Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bin/bedrock/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ async fn async_main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.service_name(BIN_NAME)
.service_namespace("si")
Expand Down
6 changes: 5 additions & 1 deletion bin/cyclone/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ async fn main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.tokio_console(args.tokio_console)
.service_name(BIN_NAME)
Expand Down
6 changes: 5 additions & 1 deletion bin/edda/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ async fn async_main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.tokio_console(args.tokio_console)
.service_name(BIN_NAME)
Expand Down
6 changes: 5 additions & 1 deletion bin/forklift/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ async fn async_main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.tokio_console(args.tokio_console)
.service_name(BIN_NAME)
Expand Down
10 changes: 5 additions & 5 deletions bin/hoist/src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ impl Display for PatchTarget {
return Err(fmt::Error);
};

f.write_str(format!("{} socket {}", kind, name).as_str())
f.write_str(format!("{kind} socket {name}").as_str())
}
PatchTarget::SocketContents(name) => {
let split_name = name.split("-").collect::<Vec<_>>();
let (Some(kind), Some(name)) = (split_name.first(), split_name.get(1)) else {
return Err(fmt::Error);
};

f.write_str(format!("contents of {} socket {}", kind, name).as_str())
f.write_str(format!("contents of {kind} socket {name}").as_str())
}
PatchTarget::Prop(name) => f.write_str(format!("prop {}", name).as_str()),
PatchTarget::Prop(name) => f.write_str(format!("prop {name}").as_str()),
PatchTarget::PropContents((name, target)) => {
f.write_str(format!("contents of prop {} at {}", name, target).as_str())
f.write_str(format!("contents of prop {name} at {target}").as_str())
}
PatchTarget::Func(name) => f.write_str(format!("function {}", name).as_str()),
PatchTarget::Func(name) => f.write_str(format!("function {name}").as_str()),
PatchTarget::FuncBinding(kind) => f.write_str(format!("{kind} binding").as_str()),
PatchTarget::Variant => f.write_str("variant"),
PatchTarget::VariantContent(path) => {
Expand Down
28 changes: 11 additions & 17 deletions bin/hoist/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async fn main() -> Result<()> {
}
None => {
if let Err(err) = Args::command().print_help() {
eprintln!("Error displaying help: {}", err);
eprintln!("Error displaying help: {err}");
std::process::exit(1);
}
std::process::exit(0);
Expand Down Expand Up @@ -228,7 +228,7 @@ async fn write_single_spec(
.iter()
.find(|m| m.name == spec_name)
.cloned()
.unwrap_or_else(|| panic!("Unable to find spec with name: {}", spec_name));
.unwrap_or_else(|| panic!("Unable to find spec with name: {spec_name}"));
write_spec(client, module.id, out).await
}

Expand Down Expand Up @@ -366,10 +366,7 @@ async fn diff_summaries_with_module_index(
let changes_with_summary = changes_with_summary.load(Ordering::SeqCst);
let hash_mismatches = hash_mismatches.load(Ordering::SeqCst);

println!(
"Total: {} new asset(s), {} changed asset(s)",
total_added, hash_mismatches
);
println!("Total: {total_added} new asset(s), {hash_mismatches} changed asset(s)");

if changes_with_summary != hash_mismatches {
println!(
Expand Down Expand Up @@ -439,7 +436,7 @@ async fn upload_pkg_specs(
let msg = format!("Parsing module: {}", spec.file_name().to_string_lossy());
pb.set_message(msg.to_string());
if non_interactive {
println!("{}", msg);
println!("{msg}");
};

let pkg = json_to_pkg(spec.path())?;
Expand All @@ -458,10 +455,7 @@ async fn upload_pkg_specs(
}
}

println!(
"🟰 {} modules have matching hashes and will be skipped",
no_action_needed
);
println!("🟰 {no_action_needed} modules have matching hashes and will be skipped");
println!(
"🔼 {} modules exist and will be updated",
modules_with_updates.len()
Expand All @@ -485,12 +479,12 @@ async fn upload_pkg_specs(
"p" => break,
"n" => {
for module in &new_modules {
println!("{}", module);
println!("{module}");
}
}
"u" => {
for module in &modules_with_updates {
println!("{}", module);
println!("{module}");
}
}

Expand All @@ -505,15 +499,15 @@ async fn upload_pkg_specs(
let msg = "⏰ Beginning uploads ...";
pb.set_message(msg);
if non_interactive {
println!("{}", msg);
println!("{msg}");
};

// Generates the "X failed" message for various set_message() calls to use
let failed = AtomicU64::new(0);
let failed_message = || {
let failed = failed.load(Ordering::Relaxed);
if failed > 0 {
format!(" ❌ {} failed. ", failed)
format!(" ❌ {failed} failed. ")
} else {
"".to_string()
}
Expand All @@ -526,7 +520,7 @@ async fn upload_pkg_specs(
let msg = format!("{}⏰ Uploading: {}", failed_message(), metadata.name());
pb.set_message(msg.to_string());
if non_interactive {
println!("{}", msg);
println!("{msg}");
};
pb.inc(1);
async move {
Expand Down Expand Up @@ -576,7 +570,7 @@ async fn upload_pkg_specs(
);
pb.finish_with_message(msg.to_string());
if non_interactive {
println!("{}", msg);
println!("{msg}");
};
// If this message is not here, the console does not show the final message for some reason
println!("Done");
Expand Down
6 changes: 5 additions & 1 deletion bin/innit/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ async fn async_main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.service_name(BIN_NAME)
.service_namespace("si")
Expand Down
6 changes: 5 additions & 1 deletion bin/innitctl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ async fn main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.service_name(BIN_NAME)
.service_namespace("si")
Expand Down
6 changes: 5 additions & 1 deletion bin/luminork/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ async fn async_main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.tokio_console(args.tokio_console)
.service_name(BIN_NAME)
Expand Down
6 changes: 5 additions & 1 deletion bin/module-index/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ async fn async_main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.tokio_console(args.tokio_console)
.service_name("module-index")
Expand Down
2 changes: 1 addition & 1 deletion bin/openapi-extractor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api = match api_result {
Ok(json_api) => json_api.0,
Err((status, message)) => {
return Err(format!("API Error ({}): {}", status, message).into());
return Err(format!("API Error ({status}): {message}").into());
}
};

Expand Down
6 changes: 5 additions & 1 deletion bin/pinga/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ async fn async_main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.tokio_console(args.tokio_console)
.service_name(BIN_NAME)
Expand Down
6 changes: 5 additions & 1 deletion bin/rebaser/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ async fn async_main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.tokio_console(args.tokio_console)
.service_name(BIN_NAME)
Expand Down
6 changes: 5 additions & 1 deletion bin/sdf/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ async fn async_main() -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.tokio_console(args.tokio_console)
.service_name(BIN_NAME)
Expand Down
6 changes: 5 additions & 1 deletion bin/veritech/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ async fn async_main(args: args::Args) -> Result<()> {
let config = TelemetryConfig::builder()
.force_color(args.force_color.then_some(true))
.no_color(args.no_color.then_some(true))
.log_format(args.log_json.then_some(LogFormat::Json).unwrap_or_default())
.log_format(if args.log_json {
LogFormat::Json
} else {
Default::default()
})
.log_file_directory(args.log_file_directory.clone())
.tokio_console(args.tokio_console)
.service_name(BIN_NAME)
Expand Down
29 changes: 23 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading