diff --git a/build.rs b/build.rs index c5cd678..3266995 100644 --- a/build.rs +++ b/build.rs @@ -1,12 +1,11 @@ use clap::{CommandFactory, ValueEnum}; -use clap_complete::{generate_to, Shell}; +use clap_complete::{Shell, generate_to}; use std::{env, io::Error}; include!("src/cli/mod.rs"); fn main() -> Result<(), Error> { - let outdir = env::var_os("SHELL_COMPLETIONS_DIR") - .or_else(|| env::var_os("OUT_DIR")); + let outdir = env::var_os("SHELL_COMPLETIONS_DIR").or_else(|| env::var_os("OUT_DIR")); let Some(outdir) = outdir else { return Ok(()); diff --git a/src/command_builder.rs b/src/command_builder.rs index 708a703..4381fa3 100644 --- a/src/command_builder.rs +++ b/src/command_builder.rs @@ -81,7 +81,7 @@ impl CommandBuilder { Ok(()) } - pub fn spawn(self) -> Result { + pub fn spawn(self) -> Result { Ok(self.build()?.spawn()?) } diff --git a/src/main.rs b/src/main.rs index 82782ec..51efbb7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,9 @@ fn main() -> Result<()> { match args.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 { cli::DockerCompose::Bash => scripts::docker_compose::bash(), cli::DockerCompose::Build => scripts::docker_compose::build(), diff --git a/src/scripts/django.rs b/src/scripts/django.rs index 83e3bff..e64821e 100644 --- a/src/scripts/django.rs +++ b/src/scripts/django.rs @@ -3,7 +3,7 @@ use std::fs::create_dir; use std::io::Write; use std::path::{Path, PathBuf}; -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; use crate::command_builder::CommandBuilder; use crate::{create_file, safe_create_file}; diff --git a/src/scripts/link.rs b/src/scripts/link.rs index fa78bf5..92f2d79 100644 --- a/src/scripts/link.rs +++ b/src/scripts/link.rs @@ -6,7 +6,7 @@ use std::os::unix::fs::symlink; use std::path::{Path, PathBuf}; use std::process::Command; -use anyhow::{anyhow, Context, Result}; +use anyhow::{Context, Result, anyhow}; const BACKUP_SUFFIX: &str = ".ahab-bak"; const LOCAL_NAMESPACE: &str = "_local"; diff --git a/src/scripts/postgres.rs b/src/scripts/postgres.rs index 30e7e2c..36575d5 100644 --- a/src/scripts/postgres.rs +++ b/src/scripts/postgres.rs @@ -1,4 +1,4 @@ -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; use std::{ fs::File, path::{Path, PathBuf},