Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c34fbfa

Browse files
committedNov 30, 2019
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
1 parent 9081929 commit c34fbfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+2527
-2285
lines changed
 

‎src/libstd/sys/cloudabi/os.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ pub fn errno() -> i32 {
1818
pub fn error_string(errno: i32) -> String {
1919
// cloudlibc's strerror() is guaranteed to be thread-safe. There is
2020
// thus no need to use strerror_r().
21-
str::from_utf8(unsafe { CStr::from_ptr(libc::strerror(errno)) }.to_bytes())
22-
.unwrap()
23-
.to_owned()
21+
str::from_utf8(unsafe { CStr::from_ptr(libc::strerror(errno)) }.to_bytes()).unwrap().to_owned()
2422
}
2523

2624
pub fn exit(code: i32) -> ! {

‎src/libstd/sys/cloudabi/shims/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::ffi::OsString;
22
use crate::fmt;
33
use crate::hash::{Hash, Hasher};
4-
use crate::io::{self, SeekFrom, IoSlice, IoSliceMut};
4+
use crate::io::{self, IoSlice, IoSliceMut, SeekFrom};
55
use crate::path::{Path, PathBuf};
66
use crate::sys::time::SystemTime;
77
use crate::sys::{unsupported, Void};

0 commit comments

Comments
 (0)
Please sign in to comment.