Skip to content

Commit

Permalink
fix: use target arch inside error message
Browse files Browse the repository at this point in the history
  • Loading branch information
oberrich committed Dec 29, 2024
1 parent 9264d86 commit 52f8285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ mod regen {
let mut raw_lines = vec![
format!("// Generated at {}", chrono::offset::Local::now()),
format!("#[cfg(not(target_arch = \"{}\"))]", std::env::var("CARGO_CFG_TARGET_ARCH").unwrap()),
format!("compile_error!(\"These bindings can only be used on `{}` architectures. To generate bindings for your target architecture, consider using the `regenerate` feature.\");", std::env::consts::ARCH),
format!("compile_error!(\"These bindings can only be used on `{}` architectures. To generate bindings for your target architecture, consider using the `regenerate` feature.\");", std::env::var("CARGO_CFG_TARGET_ARCH").unwrap()),
"".into(),
"use cty;".into(),
];
Expand Down

0 comments on commit 52f8285

Please sign in to comment.