Fix pkg-config library output for MSVC and enable Windows CI #1305
Annotations
2 errors
Run clippy:
src/build.rs#L1116
error: this `else { if .. }` block can be collapsed
--> src/build.rs:1116:20
|
1116 | } else {
| ____________________^
1117 | | if rustc_target.env == "msvc" {
1118 | | exec.link_line
1119 | | .lock()
... |
1147 | | }
1148 | | };
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `-D clippy::collapsible-else-if` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
|
1116 ~ } else if rustc_target.env == "msvc" {
1117 + exec.link_line
1118 + .lock()
1119 + .unwrap()
1120 + .values()
1121 + .next()
1122 + .map_or(String::new(), |s| {
1123 + s.trim()
1124 + .split(' ')
1125 ~ // Skip forced UCRT library changesº
1126 + .filter(|&item| !item.starts_with("/defaultlib"))
1127 + .map(|lib| {
1128 + if lib.ends_with(".lib") {
1129 + format!("-l{}", lib.trim_end_matches(".lib"))
1130 + } else {
1131 + lib.to_string()
1132 + }
1133 + })
1134 + .collect::<Vec<String>>()
1135 + .join(" ")
1136 + })
1137 + .to_string()
1138 + } else {
1139 + exec.link_line
1140 + .lock()
1141 + .unwrap()
1142 + .values()
1143 + .next()
1144 + .map_or("", |s| s)
1145 + .to_string()
1146 ~ };
|
|
Run clippy
Clippy had exited with the 101 exit code
|
Loading