Skip to content

Commit c7c63ef

Browse files
authored
Merge pull request rust-lang#4454 from tgross35/cargo-fmt
Ensure `cargo fmt` is run on all files
2 parents 1f03301 + 654bf4e commit c7c63ef

File tree

5 files changed

+21
-13
lines changed

5 files changed

+21
-13
lines changed

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const ALLOWED_CFGS: &[&str] = &[
2121
"libc_ctest",
2222
// Corresponds to `__USE_TIME_BITS64` in UAPI
2323
"linux_time_bits64",
24-
"musl_v1_2_3"
24+
"musl_v1_2_3",
2525
];
2626

2727
// Extra values to allow for check-cfg.

ci/style.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,9 @@ done < "$tmpfile"
5959

6060
rm "$tmpfile"
6161

62-
if shellcheck --version ; then
63-
# FIXME(ctest): update ctest scripts so we don't need to exclude them
64-
find . -name '*.sh' -not -path './ctest/*' -print0 | xargs -0 shellcheck
65-
else
66-
echo "shellcheck not found"
67-
exit 1
68-
fi
62+
# Run once from workspace root to get everything that wasn't handled as an
63+
# individual file.
64+
cargo fmt
6965

7066
# Ensure that `sort` output is not locale-dependent
7167
export LC_ALL=C
@@ -88,3 +84,10 @@ for file in libc-test/semver/*.txt; do
8884
exit 1
8985
fi
9086
done
87+
88+
if shellcheck --version ; then
89+
find . -name '*.sh' -print0 | xargs -0 shellcheck
90+
else
91+
echo "shellcheck not found"
92+
exit 1
93+
fi

ctest-test/tests/all.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,3 @@ fn test_invalid_include_path() {
199199

200200
assert!(err.is_err(), "Expected error with invalid include path");
201201
}
202-

ctest/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@
1313
#![recursion_limit = "256"]
1414
#![deny(missing_docs)]
1515

16-
use anyhow::{anyhow, Context, Result};
17-
use garando_syntax as syntax;
18-
use indoc::writedoc;
1916
use std::collections::{HashMap, HashSet};
2017
use std::env;
2118
use std::fs::File;
2219
use std::io::prelude::*;
2320
use std::io::BufWriter;
2421
use std::path::{Path, PathBuf};
2522
use std::rc::Rc;
23+
24+
use anyhow::{anyhow, Context, Result};
25+
use garando_syntax as syntax;
26+
use indoc::writedoc;
2627
use syntax::abi::Abi;
2728
use syntax::ast;
2829
use syntax::ast::{Attribute, Name};

src/windows/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,12 @@ extern "C" {
386386
#[link_name = "_get_timezone"]
387387
pub fn get_timezone(seconds: *mut c_long) -> errno_t;
388388
#[link_name = "_get_tzname"]
389-
pub fn get_tzname(p_return_value: *mut size_t, time_zone_name: *mut c_char, size_in_bytes: size_t, index: c_int) -> errno_t;
389+
pub fn get_tzname(
390+
p_return_value: *mut size_t,
391+
time_zone_name: *mut c_char,
392+
size_in_bytes: size_t,
393+
index: c_int,
394+
) -> errno_t;
390395
#[link_name = "_localtime64_s"]
391396
pub fn localtime_s(tmDest: *mut tm, sourceTime: *const time_t) -> crate::errno_t;
392397
#[link_name = "_time64"]

0 commit comments

Comments
 (0)