diff options
author | Aaron Hill <aa1ronham@gmail.com> | 2019-10-29 09:51:44 -0400 |
---|---|---|
committer | Aaron Hill <aa1ronham@gmail.com> | 2019-10-29 09:51:44 -0400 |
commit | ca2d53e281fa287dfa4f6bfe8768b20c9705c44f (patch) | |
tree | f71fbaad4dee76979606253d28cf8f427505e340 | |
parent | 476b6759762514c353b8f3d6375d86d747084340 (diff) | |
download | rust-libc-ca2d53e281fa287dfa4f6bfe8768b20c9705c44f.tar.gz |
Run 'cargo fmt'
-rw-r--r-- | build.rs | 6 | ||||
-rw-r--r-- | tests/const_fn.rs | 2 |
2 files changed, 5 insertions, 3 deletions
@@ -7,7 +7,8 @@ fn main() { rustc_minor_nightly().expect("Failed to get rustc version"); let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok(); let align_cargo_feature = env::var("CARGO_FEATURE_ALIGN").is_ok(); - let const_extern_fn_cargo_feature = env::var("CARGO_FEATURE_CONST_EXTERN_FN").is_ok(); + let const_extern_fn_cargo_feature = + env::var("CARGO_FEATURE_CONST_EXTERN_FN").is_ok(); let libc_ci = env::var("LIBC_CI").is_ok(); if env::var("CARGO_FEATURE_USE_STD").is_ok() { @@ -103,7 +104,8 @@ fn rustc_minor_nightly() -> Option<(u32, bool)> { let minor = pieces.next(); let nightly_raw = otry!(otry!(pieces.next()).split('-').nth(1)); - let nightly = nightly_raw.starts_with("dev") || nightly_raw.starts_with("nightly"); + let nightly = + nightly_raw.starts_with("dev") || nightly_raw.starts_with("nightly"); let minor = otry!(otry!(minor).parse().ok()); Some((minor, nightly)) diff --git a/tests/const_fn.rs b/tests/const_fn.rs index 4c413c90e8..0e7e1864b9 100644 --- a/tests/const_fn.rs +++ b/tests/const_fn.rs @@ -1,5 +1,5 @@ #![cfg(libc_const_extern_fn)] // If this does not hold, the file is empty #[cfg(target_os = "linux")] -const _FOO: libc::c_uint = unsafe { libc::CMSG_SPACE(1) }; +const _FOO: libc::c_uint = unsafe { libc::CMSG_SPACE(1) }; //^ if CMSG_SPACE is not const, this will fail to compile |