Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
bbqsrc committed Oct 26, 2024
1 parent c4f5c47 commit 1a2a733
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,15 @@ pub(crate) fn build_env(
.collect::<BTreeMap<String, OsString>>();

if env::var("MSYSTEM").is_ok() || env::var("CYGWIN").is_ok() {
envs = envs.into_iter().map(|(k, v)| {
(k, OsString::from(v.into_string().unwrap().replace("\\", "/")))
}).collect();
envs = envs
.into_iter()
.map(|(k, v)| {
(
k,
OsString::from(v.into_string().unwrap().replace('\\', "/")),
)
})
.collect();
}

if bindgen {
Expand Down
2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ pub fn run(args: Vec<String>) -> anyhow::Result<()> {
let platform = args.platform.unwrap_or(config.platform);

if let Some(output_dir) = args.output_dir.as_ref() {
if let Err(e) = fs::create_dir_all(&output_dir) {
if let Err(e) = fs::create_dir_all(output_dir) {
shell.error(format!("failed to create output dir, {e}"))?;
std::process::exit(1);
}
Expand Down

0 comments on commit 1a2a733

Please sign in to comment.