Skip to content

Commit 722b3e5

Browse files
committed
Formatting
1 parent 70e0c4e commit 722b3e5

File tree

1 file changed

+26
-29
lines changed

1 file changed

+26
-29
lines changed

libc-test/build.rs

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,20 +1013,18 @@ fn test_windows(target: &str) {
10131013

10141014
cfg.fn_cname(move |name, cname| cname.unwrap_or(name).to_string());
10151015

1016-
cfg.skip_type(move |name| {
1017-
match name {
1018-
"SSIZE_T" if !gnu => true,
1019-
"ssize_t" if !gnu => true,
1020-
_ => false,
1021-
}
1016+
cfg.skip_type(move |name| match name {
1017+
"SSIZE_T" if !gnu => true,
1018+
"ssize_t" if !gnu => true,
1019+
_ => false,
10221020
});
10231021

10241022
cfg.skip_const(move |name| {
10251023
match name {
10261024
// FIXME: API error:
10271025
// SIG_ERR type is "void (*)(int)", not "int"
10281026
"SIG_ERR" => true,
1029-
_ => false,
1027+
_ => false,
10301028
}
10311029
});
10321030

@@ -1047,10 +1045,7 @@ fn test_windows(target: &str) {
10471045
cfg.skip_fn(move |name| {
10481046
match name {
10491047
// FIXME: API error:
1050-
"execv" |
1051-
"execve" |
1052-
"execvp" |
1053-
"execvpe" => true,
1048+
"execv" | "execve" | "execvp" | "execvpe" => true,
10541049

10551050
_ => false,
10561051
}
@@ -1065,7 +1060,7 @@ fn test_redox(target: &str) {
10651060
let mut cfg = ctest::TestGenerator::new();
10661061
cfg.flag("-Wno-deprecated-declarations");
10671062

1068-
headers!{
1063+
headers! {
10691064
cfg:
10701065
"ctype.h",
10711066
"dirent.h",
@@ -1131,7 +1126,7 @@ fn test_cloudabi(target: &str) {
11311126
let mut cfg = ctest::TestGenerator::new();
11321127
cfg.flag("-Wno-deprecated-declarations");
11331128

1134-
headers!{
1129+
headers! {
11351130
cfg:
11361131
"execinfo.h",
11371132
"glob.h",
@@ -1206,7 +1201,7 @@ fn test_solaris(target: &str) {
12061201
cfg.define("__EXTENSIONS__", None);
12071202
cfg.define("_LCONV_C99", None);
12081203

1209-
headers!{
1204+
headers! {
12101205
cfg:
12111206
"ctype.h",
12121207
"dirent.h",
@@ -1269,14 +1264,13 @@ fn test_solaris(target: &str) {
12691264
"wchar.h",
12701265
}
12711266

1272-
cfg.skip_const(move |name| {
1273-
match name {
1274-
"DT_FIFO" | "DT_CHR" | "DT_DIR" | "DT_BLK" | "DT_REG" | "DT_LNK" |
1275-
"DT_SOCK" |"USRQUOTA" | "GRPQUOTA" | "PRIO_MIN" | "PRIO_MAX"
1276-
=> true,
1277-
1278-
_ => false,
1267+
cfg.skip_const(move |name| match name {
1268+
"DT_FIFO" | "DT_CHR" | "DT_DIR" | "DT_BLK" | "DT_REG" | "DT_LNK"
1269+
| "DT_SOCK" | "USRQUOTA" | "GRPQUOTA" | "PRIO_MIN" | "PRIO_MAX" => {
1270+
true
12791271
}
1272+
1273+
_ => false,
12801274
});
12811275

12821276
cfg.skip_fn(move |name| {
@@ -1412,7 +1406,7 @@ fn test_netbsd(target: &str) {
14121406
// Our stat *_nsec fields normally don't actually exist but are part
14131407
// of a timeval struct
14141408
s if s.ends_with("_nsec") && struct_.starts_with("stat") => {
1415-
s.replace("e_nsec", ".tv_nsec")
1409+
s.replace("e_nsec", ".tv_nsec")
14161410
}
14171411
"u64" if struct_ == "epoll_event" => "data.u64".to_string(),
14181412
s => s.to_string(),
@@ -1444,7 +1438,7 @@ fn test_netbsd(target: &str) {
14441438
// uuid_t is a struct, not an integer.
14451439
n if n.starts_with("pthread") => true,
14461440
// sem_t is a struct or pointer
1447-
"sem_t" => true,
1441+
"sem_t" => true,
14481442
_ => false,
14491443
}
14501444
});
@@ -1614,14 +1608,17 @@ fn test_dragonflybsd(target: &str) {
16141608
// Our stat *_nsec fields normally don't actually exist but are part
16151609
// of a timeval struct
16161610
s if s.ends_with("_nsec") && struct_.starts_with("stat") => {
1617-
s.replace("e_nsec", ".tv_nsec")
1611+
s.replace("e_nsec", ".tv_nsec")
16181612
}
16191613
"u64" if struct_ == "epoll_event" => "data.u64".to_string(),
1620-
"type_" if struct_ == "input_event"
1621-
|| struct_ == "input_mask"
1622-
|| struct_ == "ff_effect"
1623-
|| struct_ == "rtprio" =>
1624-
"type".to_string(),
1614+
"type_"
1615+
if struct_ == "input_event"
1616+
|| struct_ == "input_mask"
1617+
|| struct_ == "ff_effect"
1618+
|| struct_ == "rtprio" =>
1619+
{
1620+
"type".to_string()
1621+
}
16251622
s => s.to_string(),
16261623
}
16271624
});

0 commit comments

Comments
 (0)