Skip to content

Commit

Permalink
Fix cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nerwalt committed Aug 1, 2024
1 parent a292f4a commit 142beed
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,17 @@ fn main() {
let bindings_out_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("bindings.rs");
std::fs::write(bindings_out_path, rust_source).expect("Couldn't write updated bindgen output");

// The nrf9160 feature is on by default for legacy support, so we check for the nrf9120 feature
// first to handle the case in which both nrf9120 and nrf9160 are set (i.e., nrf9120 is set,
// but no-defaults is not set)
let libmodem_original_path = if cfg!(feature = "nrf9120") {
Path::new(&nrfxlib_path).join("nrf_modem/lib/cellular/nrf9120/soft-float/libmodem.a")
} else if cfg!(feature = "nrf9160") {
Path::new(&nrfxlib_path).join("nrf_modem/lib/cellular/nrf9160/soft-float/libmodem.a")
} else {
panic!("No chip feature selected. Supported chips are: nrf9160 or nrf9151, nrf9161, nrf9120.");
};
// The nrf9160 feature is on by default for legacy support, so we check for the nrf9120 feature
// first to handle the case in which both nrf9120 and nrf9160 are set (i.e., nrf9120 is set,
// but no-defaults is not set)
let libmodem_original_path =
if cfg!(feature = "nrf9120") {
Path::new(&nrfxlib_path).join("nrf_modem/lib/cellular/nrf9120/soft-float/libmodem.a")
} else if cfg!(feature = "nrf9160") {
Path::new(&nrfxlib_path).join("nrf_modem/lib/cellular/nrf9160/soft-float/libmodem.a")
} else {
panic!("No chip feature selected. Supported chips are: nrf9160 or nrf9151, nrf9161, nrf9120.");
};

let libmodem_changed_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("libmodem.a");

Expand Down

0 comments on commit 142beed

Please sign in to comment.