Skip to content

Commit

Permalink
chore: clippy and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
eatradish committed Dec 14, 2024
1 parent 3cff813 commit 797e34a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
10 changes: 3 additions & 7 deletions src/actions/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,7 @@ pub fn config_os(instance: Option<&str>) -> Result<()> {
}
warn!(
"Please rollback {} for the new config to take effect!",
if let Some(inst) = instance {
inst
} else {
"all your instances"
}
instance.unwrap_or("all your instances"),
);
} else {
return Err(anyhow!("Could not recognize the configuration."));
Expand Down Expand Up @@ -403,8 +399,8 @@ fn apt_update_os(instance: &str) -> Result<()> {
return Err(anyhow!("Failed to update OS: {}", status));
}

commit_container(&instance)?;
remove_instance(&instance)?;
commit_container(instance)?;
remove_instance(instance)?;

Ok(())
}
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use console::{style, user_attended};
use dotenvy::dotenv;
use std::process;
use std::{path::Path, process::Command};
use libc;

use crate::actions::BuildSettings;
use crate::common::*;
Expand Down Expand Up @@ -101,7 +100,9 @@ fn update_tree(path: &Path, branch: Option<&String>, rebase_from: Option<&String

fn main() -> Result<()> {
// set umask to 022 to ensure correct permissions on rootfs
unsafe { libc::umask(libc::S_IWGRP | libc:: S_IWOTH); }
unsafe {
libc::umask(libc::S_IWGRP | libc::S_IWOTH);
}

// source .env file, ignore errors
dotenv().ok();
Expand Down

0 comments on commit 797e34a

Please sign in to comment.