mirror of
https://github.com/uutils/coreutils.git
synced 2025-07-07 21:45:01 +00:00
cargo fmt
This commit is contained in:
parent
15722e3ace
commit
5af8503a5e
119 changed files with 1270 additions and 923 deletions
25
build.rs
25
build.rs
|
@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue