We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8199f85 commit f927d2aCopy full SHA for f927d2a
src/cargo/core/compiler/build_context/target_info.rs
@@ -599,11 +599,10 @@ fn env_args(
599
// First try CARGO_ENCODED_RUSTFLAGS from the environment.
600
// Prefer this over RUSTFLAGS since it's less prone to encoding errors.
601
if let Ok(a) = env::var(format!("CARGO_ENCODED_{}", name)) {
602
- let args = a
603
- .split('\x1f')
604
- .filter(|s| !s.is_empty())
605
- .map(str::to_string);
606
- return Ok(args.collect());
+ if a.is_empty() {
+ return Ok(Vec::new());
+ }
+ return Ok(a.split('\x1f').map(str::to_string).collect());
607
}
608
609
// Then try RUSTFLAGS from the environment
0 commit comments