cargo fmt

This commit is contained in:
Roy Ivy III 2020-01-27 23:14:11 -06:00
parent 15722e3ace
commit 5af8503a5e
119 changed files with 1270 additions and 923 deletions

View file

@ -16,8 +16,8 @@ pub fn main() {
if val == "1" && key.starts_with(feature_prefix) {
let krate = key[feature_prefix.len()..].to_lowercase();
match krate.as_ref() {
"default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows" | "windows_legacy"
| "nightly" | "test_unimplemented" => continue,
"default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic"
| "windows" | "windows_legacy" | "nightly" | "test_unimplemented" => continue,
_ => {}
}
crates.push(krate.to_string());
@ -35,7 +35,8 @@ pub fn main() {
fn util_map() -> UtilityMap {
let mut map: UtilityMap = HashMap::new();\n"
.as_bytes(),
).unwrap();
)
.unwrap();
for krate in crates {
cf.write_all(format!("extern crate uu_{krate};\n", krate = krate).as_bytes())
@ -59,14 +60,18 @@ pub fn main() {
map.insert(\"shake128sum\", uu_hashsum::uumain);
map.insert(\"shake256sum\", uu_hashsum::uumain);\n"
.as_bytes(),
).unwrap();
)
.unwrap();
}
_ => mf.write_all(
format!(
"map.insert(\"{krate}\", uu_{krate}::uumain);\n",
krate = krate
).as_bytes(),
).unwrap(),
_ => mf
.write_all(
format!(
"map.insert(\"{krate}\", uu_{krate}::uumain);\n",
krate = krate
)
.as_bytes(),
)
.unwrap(),
}
}