Skip to content

Commit

Permalink
Ran cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
humblepenguinn committed Apr 8, 2024
1 parent 7c58b61 commit 245e687
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/bin/envio/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl Command {
} else {
envs_vec = Some(EnvVec::new()); // The user created a profile without any envs
}

for env in envs_vec.as_mut().unwrap() {
if *add_comments {
let prompt =
Expand Down Expand Up @@ -364,7 +364,7 @@ impl Command {
profile.insert_env(env.to_string(), value)
}
}

for env in &mut profile.envs {
if *add_comments {
let prompt =
Expand Down
2 changes: 1 addition & 1 deletion src/bin/envio/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use version::get_latest_version;

fn main() {
color_eyre::install().unwrap();

let latest_version = get_latest_version();

let current_version = if let Ok(val) = Version::parse(env!("BUILD_VERSION")) {
Expand Down
12 changes: 8 additions & 4 deletions src/bin/envio/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use reqwest::Client;

#[cfg(target_family = "unix")]
pub fn initalize_config() -> Result<()> {
use std::path::Path;
use colored::Colorize;
use inquire::Text;
use std::path::Path;

let configdir = get_configdir()?;
let homedir = get_homedir()?;
Expand Down Expand Up @@ -41,11 +41,15 @@ pub fn initalize_config() -> Result<()> {
file_path = if let Ok(val) = input {
PathBuf::from(val)
} else {
return Err(Error::Msg("Failed to get shell config file path".to_string()));
return Err(Error::Msg(
"Failed to get shell config file path".to_string(),
));
};

if !file_path.exists() {
return Err(Error::Msg("Specified shell config file does not exist".to_string()));
return Err(Error::Msg(
"Specified shell config file does not exist".to_string(),
));
}
}

Expand Down Expand Up @@ -78,7 +82,7 @@ source {}
)
};

writeln!(file, "{}", buffer)?
writeln!(file, "{}", buffer)?
}

Ok(())
Expand Down

0 comments on commit 245e687

Please sign in to comment.