Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
russelltg committed Mar 19, 2024
1 parent c63780d commit 4d3fa6d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2399,7 +2399,7 @@ impl Build {

let target = self.get_target()?;
let (mut ar, cmd, _any_flags) = self.get_ar()?;
if target.contains("msvc") && ! cmd.to_str().unwrap().contains("llvm-") {
if target.contains("msvc") && !cmd.to_str().unwrap().contains("llvm-") {
// The Rust compiler will look for libfoo.a and foo.lib, but the
// MSVC linker will also be passed foo.lib, so be sure that both
// exist for now.
Expand Down Expand Up @@ -2482,7 +2482,11 @@ impl Build {
// NOTE: We add cq here regardless of whether $ARFLAGS/ar_flag have been used because
// it dictates the _mode_ ar runs in, which the setter of $ARFLAGS/ar_flag can't
// dictate. See https://github.com/rust-lang/cc-rs/pull/763 for further discussion.
run(cmd.arg("cq").arg(dst).args(objs), &program, &self.cargo_output)?;
run(
cmd.arg("cq").arg(dst).args(objs),
&program,
&self.cargo_output,
)?;
}

Ok(())
Expand Down Expand Up @@ -3122,7 +3126,11 @@ impl Build {
Ok(self.get_base_archiver_variant("RANLIB", "ranlib")?.0)
}

fn get_base_archiver_variant(&self, env: &str, tool: &str) -> Result<(Command, PathBuf), Error> {
fn get_base_archiver_variant(
&self,
env: &str,
tool: &str,
) -> Result<(Command, PathBuf), Error> {
let target = self.get_target()?;
let mut name = PathBuf::new();
let tool_opt: Option<Command> = self
Expand Down

0 comments on commit 4d3fa6d

Please sign in to comment.