Skip to content

Commit 236e069

Browse files
committed
style: Run cargo fmt with the new configuration
1 parent 0456dcb commit 236e069

File tree

11 files changed

+22
-31
lines changed

11 files changed

+22
-31
lines changed

build.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use std::env;
21
use std::process::{Command, Output};
3-
use std::str;
2+
use std::{env, str};
43

54
// List of cfgs this build script is allowed to set. The list is needed to support check-cfg, as we
65
// need to know all the possible cfgs that this script will set. If you need to set another cfg

libc-test/test/cmsg.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
#[cfg(unix)]
55
mod t {
66

7-
use libc::{self, c_uchar, c_uint, c_void, cmsghdr, msghdr};
87
use std::mem;
98

9+
use libc::{self, c_uchar, c_uint, c_void, cmsghdr, msghdr};
10+
1011
extern "C" {
1112
pub fn cmsg_firsthdr(msgh: *const msghdr) -> *mut cmsghdr;
1213
// see below

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ cfg_if! {
4646
use core::clone::Clone;
4747
#[allow(unused_imports)]
4848
use core::ffi;
49+
pub use core::ffi::c_void;
4950
#[allow(unused_imports)]
5051
use core::fmt;
5152
#[allow(unused_imports)]
@@ -61,8 +62,6 @@ use core::num;
6162
#[allow(unused_imports)]
6263
use core::option::Option;
6364

64-
pub use core::ffi::c_void;
65-
6665
cfg_if! {
6766
if #[cfg(windows)] {
6867
mod fixed_width_ints;

src/unix/linux_like/emscripten/lfs64.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ pub unsafe extern "C" fn mmap64(
106106
//
107107
// These aliases are mostly fine though, neither function takes a LFS64-namespaced type as an
108108
// argument, nor do their names clash with any declared types.
109-
pub use open as open64;
110-
pub use openat as openat64;
109+
pub use {open as open64, openat as openat64};
111110

112111
#[inline]
113112
pub unsafe extern "C" fn posix_fadvise64(

src/unix/linux_like/linux/musl/lfs64.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ pub unsafe extern "C" fn mmap64(
114114
//
115115
// These aliases are mostly fine though, neither function takes a LFS64-namespaced type as an
116116
// argument, nor do their names clash with any declared types.
117-
pub use open as open64;
118-
pub use openat as openat64;
117+
pub use {open as open64, openat as openat64};
119118

120119
#[inline]
121120
pub unsafe extern "C" fn posix_fadvise64(

src/unix/nuttx/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
use c_void;
2-
use in6_addr;
3-
use in_addr_t;
4-
use timespec;
5-
use DIR;
1+
use {c_void, in6_addr, in_addr_t, timespec, DIR};
62

73
pub type nlink_t = u16;
84
pub type ino_t = u16;

src/unix/solarish/compat.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Solaris, but often needed by other crates.
33

44
use core::cmp::min;
5+
56
use unix::solarish::*;
67

78
const PTEM: &[u8] = b"ptem\0";

src/unix/solarish/illumos.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
use exit_status;
2-
use NET_MAC_AWARE;
3-
use NET_MAC_AWARE_INHERIT;
4-
use PRIV_AWARE_RESET;
5-
use PRIV_DEBUG;
6-
use PRIV_PFEXEC;
7-
use PRIV_XPOLICY;
1+
use {
2+
exit_status, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, PRIV_PFEXEC,
3+
PRIV_XPOLICY,
4+
};
85

96
pub type lgrp_rsrc_t = ::c_int;
107
pub type lgrp_affinity_t = ::c_int;

src/unix/solarish/solaris.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
use exit_status;
2-
use NET_MAC_AWARE;
3-
use NET_MAC_AWARE_INHERIT;
4-
use PRIV_AWARE_RESET;
5-
use PRIV_DEBUG;
6-
use PRIV_PFEXEC;
7-
use PRIV_XPOLICY;
1+
use {
2+
exit_status, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, PRIV_PFEXEC,
3+
PRIV_XPOLICY,
4+
};
85

96
pub type door_attr_t = ::c_uint;
107
pub type door_id_t = ::c_ulonglong;

src/vxworks/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
//! Interface to VxWorks C library
22
3-
use c_void;
43
use core::mem::size_of;
54
use core::ptr::null_mut;
65

6+
use c_void;
7+
78
#[cfg_attr(feature = "extra_traits", derive(Debug))]
89
pub enum DIR {}
910
impl ::Copy for DIR {}

src/wasi/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
//! `wasi-libc` project provides multiple libraries including emulated features, but we list only
44
//! basic features with `libc.a` here.
55
6-
use super::{Send, Sync};
7-
use c_void;
86
use core::iter::Iterator;
97

8+
use c_void;
9+
10+
use super::{Send, Sync};
11+
1012
pub type c_char = i8;
1113
pub type c_uchar = u8;
1214
pub type c_schar = i8;

0 commit comments

Comments
 (0)