style: run cargo fmt

This commit is contained in:
2026-09-04 09:17:48 +00:00
parent e10e1fb017
commit 8751c39cce
6 changed files with 9 additions and 8 deletions

View File

@@ -1,12 +1,11 @@
use clap::{CommandFactory, ValueEnum}; use clap::{CommandFactory, ValueEnum};
use clap_complete::{generate_to, Shell}; use clap_complete::{Shell, generate_to};
use std::{env, io::Error}; use std::{env, io::Error};
include!("src/cli/mod.rs"); include!("src/cli/mod.rs");
fn main() -> Result<(), Error> { fn main() -> Result<(), Error> {
let outdir = env::var_os("SHELL_COMPLETIONS_DIR") let outdir = env::var_os("SHELL_COMPLETIONS_DIR").or_else(|| env::var_os("OUT_DIR"));
.or_else(|| env::var_os("OUT_DIR"));
let Some(outdir) = outdir else { let Some(outdir) = outdir else {
return Ok(()); return Ok(());

View File

@@ -81,7 +81,7 @@ impl CommandBuilder {
Ok(()) Ok(())
} }
pub fn spawn(self) -> Result<Child > { pub fn spawn(self) -> Result<Child> {
Ok(self.build()?.spawn()?) Ok(self.build()?.spawn()?)
} }

View File

@@ -11,7 +11,9 @@ fn main() -> Result<()> {
match args.command { match args.command {
cli::Commands::Compose { command } => { cli::Commands::Compose { command } => {
eprintln!("DEPRECATION NOTICE: this is deprecated in favor of docker compose COMPOSE_FILE env"); eprintln!(
"DEPRECATION NOTICE: this is deprecated in favor of docker compose COMPOSE_FILE env"
);
match command { match command {
cli::DockerCompose::Bash => scripts::docker_compose::bash(), cli::DockerCompose::Bash => scripts::docker_compose::bash(),
cli::DockerCompose::Build => scripts::docker_compose::build(), cli::DockerCompose::Build => scripts::docker_compose::build(),

View File

@@ -3,7 +3,7 @@ use std::fs::create_dir;
use std::io::Write; use std::io::Write;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use anyhow::{anyhow, Result}; use anyhow::{Result, anyhow};
use crate::command_builder::CommandBuilder; use crate::command_builder::CommandBuilder;
use crate::{create_file, safe_create_file}; use crate::{create_file, safe_create_file};

View File

@@ -6,7 +6,7 @@ use std::os::unix::fs::symlink;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::process::Command; use std::process::Command;
use anyhow::{anyhow, Context, Result}; use anyhow::{Context, Result, anyhow};
const BACKUP_SUFFIX: &str = ".ahab-bak"; const BACKUP_SUFFIX: &str = ".ahab-bak";
const LOCAL_NAMESPACE: &str = "_local"; const LOCAL_NAMESPACE: &str = "_local";

View File

@@ -1,4 +1,4 @@
use anyhow::{anyhow, Result}; use anyhow::{Result, anyhow};
use std::{ use std::{
fs::File, fs::File,
path::{Path, PathBuf}, path::{Path, PathBuf},