Format libstd/sys with rustfmt
This commit applies rustfmt with rust-lang/rust's default settings to files in src/libstd/sys *that are not involved in any currently open PR* to minimize merge conflicts. THe list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in outstanding_files, the relevant commands were: $ find src/libstd/sys -name '*.rs' \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ rg libstd/sys outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of the files. To confirm no funny business: $ git checkout $THIS_COMMIT^ $ git show --pretty= --name-only $THIS_COMMIT \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ git diff $THIS_COMMIT # there should be no difference
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
|
||||
use crate::ffi::OsStr;
|
||||
use crate::io;
|
||||
use crate::os::unix::io::{FromRawFd, RawFd, AsRawFd, IntoRawFd};
|
||||
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
|
||||
use crate::process;
|
||||
use crate::sys;
|
||||
use crate::sys_common::{AsInnerMut, AsInner, FromInner, IntoInner};
|
||||
use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
|
||||
|
||||
/// Unix-specific extensions to the [`process::Command`] builder.
|
||||
///
|
||||
@@ -56,7 +56,8 @@ pub trait CommandExt {
|
||||
/// locations may not appear where intended.
|
||||
#[stable(feature = "process_pre_exec", since = "1.34.0")]
|
||||
unsafe fn pre_exec<F>(&mut self, f: F) -> &mut process::Command
|
||||
where F: FnMut() -> io::Result<()> + Send + Sync + 'static;
|
||||
where
|
||||
F: FnMut() -> io::Result<()> + Send + Sync + 'static;
|
||||
|
||||
/// Schedules a closure to be run just before the `exec` function is
|
||||
/// invoked.
|
||||
@@ -68,7 +69,8 @@ pub trait CommandExt {
|
||||
#[stable(feature = "process_exec", since = "1.15.0")]
|
||||
#[rustc_deprecated(since = "1.37.0", reason = "should be unsafe, use `pre_exec` instead")]
|
||||
fn before_exec<F>(&mut self, f: F) -> &mut process::Command
|
||||
where F: FnMut() -> io::Result<()> + Send + Sync + 'static
|
||||
where
|
||||
F: FnMut() -> io::Result<()> + Send + Sync + 'static,
|
||||
{
|
||||
unsafe { self.pre_exec(f) }
|
||||
}
|
||||
@@ -111,7 +113,8 @@ pub trait CommandExt {
|
||||
/// default executable path.
|
||||
#[unstable(feature = "process_set_argv0", issue = "66510")]
|
||||
fn arg0<S>(&mut self, arg: S) -> &mut process::Command
|
||||
where S: AsRef<OsStr>;
|
||||
where
|
||||
S: AsRef<OsStr>;
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
@@ -127,7 +130,8 @@ impl CommandExt for process::Command {
|
||||
}
|
||||
|
||||
unsafe fn pre_exec<F>(&mut self, f: F) -> &mut process::Command
|
||||
where F: FnMut() -> io::Result<()> + Send + Sync + 'static
|
||||
where
|
||||
F: FnMut() -> io::Result<()> + Send + Sync + 'static,
|
||||
{
|
||||
self.as_inner_mut().pre_exec(Box::new(f));
|
||||
self
|
||||
@@ -138,7 +142,8 @@ impl CommandExt for process::Command {
|
||||
}
|
||||
|
||||
fn arg0<S>(&mut self, arg: S) -> &mut process::Command
|
||||
where S: AsRef<OsStr>
|
||||
where
|
||||
S: AsRef<OsStr>,
|
||||
{
|
||||
self.as_inner_mut().set_arg_0(arg.as_ref());
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user