Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
FerrisWasTaken committed May 7, 2024
1 parent 6c69059 commit ff600c2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
13 changes: 6 additions & 7 deletions paxy-plugin/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use std::{
fs,
process::Command,
};
use std::{fs, process::Command};

use extism_pdk::{plugin_fn, FnResult, Json};
use semver::{Version, VersionReq};
Expand Down Expand Up @@ -44,9 +41,11 @@ fn exec_inst(commands: String) {
cmd.args(args);
let mut handle = match cmd.spawn() {
Ok(c) => c,
Err(_) => panic!("Illegal expression: {stmt}")
Err(_) => panic!("Illegal expression: {stmt}"),
};
handle.wait().unwrap();
handle
.wait()
.unwrap();
}
}

Expand All @@ -62,4 +61,4 @@ pub fn prep(req: Json<Version>) -> FnResult<String> {
}
}
todo!()
}
}
3 changes: 2 additions & 1 deletion paxy/src/actions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ pub fn ensure_path(path: Option<&PathBuf>) {

// region: IMPORTS

use snafu::Snafu;
use std::path::PathBuf;

use snafu::Snafu;

// endregion: IMPORTS

// region: MODULES
Expand Down
2 changes: 1 addition & 1 deletion paxy/src/actions/repository/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub enum Error {
// region: IMPORTS

use std::{
fs::{write, File, remove_dir_all},
fs::{remove_dir_all, write, File},
path::PathBuf,
};

Expand Down
9 changes: 3 additions & 6 deletions paxy/src/app/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@ pub fn init_config(config_filepath: Option<&Path>) -> Result<(Config, Vec<PathBu
// Merge configuration values from global and local filepaths
figment = candidate_config_filepath_stubs
.iter()
.fold(
figment,
move |figment, candidate_config_filepath_stub| {
admerge_from_stub(candidate_config_filepath_stub, figment)
},
);
.fold(figment, move |figment, candidate_config_filepath_stub| {
admerge_from_stub(candidate_config_filepath_stub, figment)
});

// Merge configuration values from environment variables
figment = figment.admerge(Env::prefixed(&format!("{}_", *app::APP_NAME)));
Expand Down

0 comments on commit ff600c2

Please sign in to comment.