-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This step was performed automatically with the following: ```sh #!/bin/bash set -eux files=() prelude_types=( c_char c_int c_longlong c_long c_short c_uchar c_uint c_ulonglong c_ulong c_ushort c_void intptr_t size_t ssize_t Clone Copy Option ) # Generate a list of all files excluding `lib.rs` (since the prelude being # defined there makes string matching weird). while IFS= read -r -d '' file; do files+=("$file") done < <(find src -name '*.rs' -not -name 'lib.rs' -print0) for file in "${files[@]}"; do for ty in "${prelude_types[@]}"; do # If the type isn't imported or used by path, skip it if ! rg -qU "(crate::$ty|use crate::(\{\n)?.*$ty)" $file; then continue fi # Check if the prelude already exists and if not, add it if ! rg -q "use crate::prelude::\*" $file; then perl -pi -0777 -e 's/(use crate::)/use crate::prelude::*;\n$1/' "$file" fi # Remove simple imports `use crate::ty;` TY="$ty" perl -pi -0777 -e 's/use crate::($ENV{TY});//g' "$file" # Replace pathed `crate::ty` TY="$ty" perl -pi -0777 -e 's/crate::($ENV{TY})\b/$1/g' "$file" # Remove the type if it is part of a group import TY="$ty" perl -pi -0777 -e 's/(use crate::\{?(.*|(\n.*){1,2}))\b$ENV{TY}\b,? ?/$1/g' "$file" done rustfmt $file done ``` # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Wed Nov 27 13:11:46 2024 -0500 # # On branch crate-prelude # Changes to be committed: # modified: src/fuchsia/aarch64.rs # modified: src/fuchsia/mod.rs # modified: src/fuchsia/riscv64.rs # modified: src/fuchsia/x86_64.rs # modified: src/hermit.rs # modified: src/solid/mod.rs # modified: src/unix/aix/mod.rs # modified: src/unix/aix/powerpc64.rs # modified: src/unix/bsd/apple/b32/mod.rs # modified: src/unix/bsd/apple/b64/aarch64/mod.rs # modified: src/unix/bsd/apple/b64/mod.rs # modified: src/unix/bsd/apple/b64/x86_64/mod.rs # modified: src/unix/bsd/apple/mod.rs # modified: src/unix/bsd/freebsdlike/dragonfly/mod.rs # modified: src/unix/bsd/freebsdlike/freebsd/aarch64.rs # modified: src/unix/bsd/freebsdlike/freebsd/arm.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs # modified: src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs # modified: src/unix/bsd/freebsdlike/freebsd/mod.rs # modified: src/unix/bsd/freebsdlike/freebsd/powerpc.rs # modified: src/unix/bsd/freebsdlike/freebsd/powerpc64.rs # modified: src/unix/bsd/freebsdlike/freebsd/riscv64.rs # modified: src/unix/bsd/freebsdlike/freebsd/x86.rs # modified: src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs # modified: src/unix/bsd/freebsdlike/mod.rs # modified: src/unix/bsd/mod.rs # modified: src/unix/bsd/netbsdlike/mod.rs # modified: src/unix/bsd/netbsdlike/netbsd/aarch64.rs # modified: src/unix/bsd/netbsdlike/netbsd/arm.rs # modified: src/unix/bsd/netbsdlike/netbsd/mips.rs # modified: src/unix/bsd/netbsdlike/netbsd/mod.rs # modified: src/unix/bsd/netbsdlike/netbsd/powerpc.rs # modified: src/unix/bsd/netbsdlike/netbsd/riscv64.rs # modified: src/unix/bsd/netbsdlike/netbsd/sparc64.rs # modified: src/unix/bsd/netbsdlike/netbsd/x86.rs # modified: src/unix/bsd/netbsdlike/netbsd/x86_64.rs # modified: src/unix/bsd/netbsdlike/openbsd/aarch64.rs # modified: src/unix/bsd/netbsdlike/openbsd/mod.rs # modified: src/unix/bsd/netbsdlike/openbsd/riscv64.rs # modified: src/unix/bsd/netbsdlike/openbsd/x86.rs # modified: src/unix/bsd/netbsdlike/openbsd/x86_64.rs # modified: src/unix/haiku/mod.rs # modified: src/unix/haiku/native.rs # modified: src/unix/haiku/x86_64.rs # modified: src/unix/hurd/b32.rs # modified: src/unix/hurd/b64.rs # modified: src/unix/hurd/mod.rs # modified: src/unix/linux_like/android/b32/arm.rs # modified: src/unix/linux_like/android/b32/mod.rs # modified: src/unix/linux_like/android/b32/x86/mod.rs # modified: src/unix/linux_like/android/b64/aarch64/mod.rs # modified: src/unix/linux_like/android/b64/mod.rs # modified: src/unix/linux_like/android/b64/riscv64/mod.rs # modified: src/unix/linux_like/android/b64/x86_64/mod.rs # modified: src/unix/linux_like/android/mod.rs # modified: src/unix/linux_like/emscripten/lfs64.rs # modified: src/unix/linux_like/emscripten/mod.rs # modified: src/unix/linux_like/linux/arch/generic/mod.rs # modified: src/unix/linux_like/linux/arch/mips/mod.rs # modified: src/unix/linux_like/linux/arch/powerpc/mod.rs # modified: src/unix/linux_like/linux/arch/sparc/mod.rs # modified: src/unix/linux_like/linux/gnu/b32/arm/mod.rs # modified: src/unix/linux_like/linux/gnu/b32/csky/mod.rs # modified: src/unix/linux_like/linux/gnu/b32/m68k/mod.rs # modified: src/unix/linux_like/linux/gnu/b32/mips/mod.rs # modified: src/unix/linux_like/linux/gnu/b32/mod.rs # modified: src/unix/linux_like/linux/gnu/b32/powerpc.rs # modified: src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs # modified: src/unix/linux_like/linux/gnu/b32/sparc/mod.rs # modified: src/unix/linux_like/linux/gnu/b32/x86/mod.rs # modified: src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs # modified: src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs # modified: src/unix/linux_like/linux/gnu/b64/mips64/mod.rs # modified: src/unix/linux_like/linux/gnu/b64/mod.rs # modified: src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs # modified: src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs # modified: src/unix/linux_like/linux/gnu/b64/s390x.rs # modified: src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs # modified: src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs # modified: src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs # modified: src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs # modified: src/unix/linux_like/linux/gnu/mod.rs # modified: src/unix/linux_like/linux/mod.rs # modified: src/unix/linux_like/linux/musl/b32/arm/mod.rs # modified: src/unix/linux_like/linux/musl/b32/hexagon.rs # modified: src/unix/linux_like/linux/musl/b32/mips/mod.rs # modified: src/unix/linux_like/linux/musl/b32/mod.rs # modified: src/unix/linux_like/linux/musl/b32/powerpc.rs # modified: src/unix/linux_like/linux/musl/b32/riscv32/mod.rs # modified: src/unix/linux_like/linux/musl/b32/x86/mod.rs # modified: src/unix/linux_like/linux/musl/b64/aarch64/mod.rs # modified: src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs # modified: src/unix/linux_like/linux/musl/b64/mips64.rs # modified: src/unix/linux_like/linux/musl/b64/mod.rs # modified: src/unix/linux_like/linux/musl/b64/powerpc64.rs # modified: src/unix/linux_like/linux/musl/b64/riscv64/mod.rs # modified: src/unix/linux_like/linux/musl/b64/s390x.rs # modified: src/unix/linux_like/linux/musl/b64/x86_64/mod.rs # modified: src/unix/linux_like/linux/musl/lfs64.rs # modified: src/unix/linux_like/linux/musl/mod.rs # modified: src/unix/linux_like/linux/uclibc/arm/mod.rs # modified: src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs # modified: src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs # modified: src/unix/linux_like/linux/uclibc/mips/mod.rs # modified: src/unix/linux_like/linux/uclibc/mod.rs # modified: src/unix/linux_like/linux/uclibc/x86_64/l4re.rs # modified: src/unix/linux_like/linux/uclibc/x86_64/mod.rs # modified: src/unix/linux_like/linux/uclibc/x86_64/other.rs # modified: src/unix/linux_like/mod.rs # modified: src/unix/mod.rs # modified: src/unix/newlib/aarch64/mod.rs # modified: src/unix/newlib/arm/mod.rs # modified: src/unix/newlib/espidf/mod.rs # modified: src/unix/newlib/generic.rs # modified: src/unix/newlib/horizon/mod.rs # modified: src/unix/newlib/mod.rs # modified: src/unix/newlib/powerpc/mod.rs # modified: src/unix/newlib/rtems/mod.rs # modified: src/unix/newlib/vita/mod.rs # modified: src/unix/nto/aarch64.rs # modified: src/unix/nto/mod.rs # modified: src/unix/nto/neutrino.rs # modified: src/unix/nto/x86_64.rs # modified: src/unix/nuttx/mod.rs # modified: src/unix/redox/mod.rs # modified: src/unix/solarish/compat.rs # modified: src/unix/solarish/illumos.rs # modified: src/unix/solarish/mod.rs # modified: src/unix/solarish/solaris.rs # modified: src/unix/solarish/x86.rs # modified: src/unix/solarish/x86_64.rs # modified: src/vxworks/mod.rs # modified: src/wasi/mod.rs # modified: src/wasi/p2.rs # modified: src/windows/gnu/mod.rs # modified: src/windows/mod.rs # modified: src/windows/msvc/mod.rs #
- Loading branch information
Showing
146 changed files
with
256 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::{c_int, c_longlong, size_t}; | ||
use crate::prelude::*; | ||
|
||
pub type c_char = u8; | ||
pub type c_long = i64; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::{c_int, c_uint, c_void, size_t}; | ||
use crate::prelude::*; | ||
|
||
pub type c_char = u8; | ||
pub type c_long = i32; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::{c_int, size_t}; | ||
use crate::prelude::*; | ||
|
||
pub type c_char = u8; | ||
pub type c_long = i32; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::{c_int, size_t}; | ||
use crate::prelude::*; | ||
|
||
pub type c_char = u8; | ||
pub type c_long = i64; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::{c_int, c_longlong, size_t}; | ||
use crate::prelude::*; | ||
|
||
pub type c_char = u8; | ||
pub type c_long = i64; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::{c_int, size_t}; | ||
use crate::prelude::*; | ||
|
||
pub type c_char = i8; | ||
pub type c_long = i32; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::{c_int, c_void, size_t}; | ||
use crate::prelude::*; | ||
|
||
pub type c_char = i8; | ||
pub type c_long = i64; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::c_uchar; | ||
use crate::prelude::*; | ||
|
||
pub type c_long = i64; | ||
pub type c_ulong = u64; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::{c_int, c_uchar}; | ||
use crate::prelude::*; | ||
|
||
pub type c_long = i32; | ||
pub type c_ulong = u32; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::c_int; | ||
use crate::prelude::*; | ||
|
||
pub type c_long = i64; | ||
pub type c_ulong = u64; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::c_int; | ||
use crate::prelude::*; | ||
|
||
pub type c_long = i64; | ||
pub type c_ulong = u64; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use crate::c_int; | ||
use crate::prelude::*; | ||
|
||
pub type c_long = i32; | ||
pub type c_ulong = u32; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.