mirror of
https://github.com/openharmony/third_party_rust_rustix.git
synced 2026-07-21 10:15:30 -04:00
Update to Rust 2021.
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ description = "Safe Rust (\"rs\") bindings to POSIX-like/Unix-like/Linux (\"ix\"
|
||||
documentation = "https://docs.rs/rsix"
|
||||
license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
|
||||
repository = "https://github.com/bytecodealliance/rsix"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
keywords = ["api", "file", "network"]
|
||||
categories = ["filesystem", "network-programming", "os::unix-apis"]
|
||||
exclude = ["/.github"]
|
||||
|
||||
@@ -7,8 +7,6 @@ use super::offset::libc_off_t;
|
||||
#[cfg(not(windows))]
|
||||
use crate::ffi::ZStr;
|
||||
use crate::io::{self, OwnedFd};
|
||||
#[cfg(windows)]
|
||||
use core::convert::TryInto;
|
||||
|
||||
#[cfg(not(windows))]
|
||||
#[inline]
|
||||
|
||||
@@ -75,7 +75,6 @@ use crate::ffi::ZStr;
|
||||
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
||||
use crate::ffi::ZString;
|
||||
use crate::io::{self, OwnedFd, SeekFrom};
|
||||
use core::convert::TryInto;
|
||||
#[cfg(any(target_os = "android", target_os = "linux"))]
|
||||
use core::mem::size_of;
|
||||
#[cfg(target_os = "linux")]
|
||||
|
||||
@@ -62,7 +62,6 @@ use super::super::fd::{FromFd, FromRawFd, IntoFd, IntoRawFd};
|
||||
use crate::io::{self, OwnedFd};
|
||||
use alloc::vec::Vec;
|
||||
use bitflags::bitflags;
|
||||
use core::convert::TryInto;
|
||||
use core::fmt;
|
||||
use core::marker::PhantomData;
|
||||
use core::ops::Deref;
|
||||
|
||||
@@ -29,7 +29,6 @@ use super::{MlockFlags, ReadWriteFlags};
|
||||
use crate::ffi::ZStr;
|
||||
use crate::io::{self, IoSlice, IoSliceMut, OwnedFd};
|
||||
use core::cmp::min;
|
||||
use core::convert::TryInto;
|
||||
use core::mem::MaybeUninit;
|
||||
#[cfg(not(any(target_os = "redox", target_env = "newlib")))]
|
||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
@@ -19,7 +19,6 @@ use super::{
|
||||
use crate::as_ptr;
|
||||
use crate::io::{self, OwnedFd};
|
||||
use crate::net::{SocketAddrAny, SocketAddrV4, SocketAddrV6};
|
||||
use core::convert::TryInto;
|
||||
use core::mem::{size_of, MaybeUninit};
|
||||
#[cfg(not(any(target_os = "redox", target_os = "wasi",)))]
|
||||
use core::ptr::null_mut;
|
||||
@@ -398,7 +397,6 @@ pub(crate) mod sockopt {
|
||||
use crate::net::Ipv6Addr;
|
||||
use crate::net::{Ipv4Addr, SocketType};
|
||||
use crate::{as_mut_ptr, io};
|
||||
use core::convert::TryInto;
|
||||
use core::time::Duration;
|
||||
|
||||
#[inline]
|
||||
|
||||
@@ -31,8 +31,6 @@ use crate::process::Rlimit;
|
||||
use crate::process::{Cpuid, MembarrierCommand, MembarrierQuery};
|
||||
#[cfg(not(target_os = "wasi"))]
|
||||
use crate::process::{Gid, Pid, Uid, WaitOptions, WaitStatus};
|
||||
#[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))]
|
||||
use core::convert::TryInto;
|
||||
use core::mem::MaybeUninit;
|
||||
|
||||
#[cfg(not(target_os = "wasi"))]
|
||||
|
||||
@@ -228,7 +228,6 @@ pub(super) fn dev_t<'a, Num: ArgNumber>(dev: u64) -> ArgReg<'a, Num> {
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
#[inline]
|
||||
pub(super) fn dev_t<'a, Num: ArgNumber>(dev: u64) -> io::Result<ArgReg<'a, Num>> {
|
||||
use core::convert::TryInto;
|
||||
dev.try_into().map(raw_arg).map_err(|_err| io::Error::INVAL)
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ use super::{
|
||||
};
|
||||
use crate::ffi::ZStr;
|
||||
use crate::io::{self, OwnedFd, SeekFrom};
|
||||
use core::convert::TryInto;
|
||||
use core::mem::MaybeUninit;
|
||||
#[cfg(target_arch = "arm")]
|
||||
use linux_raw_sys::general::__NR_arm_fadvise64_64 as __NR_fadvise64_64;
|
||||
|
||||
@@ -43,7 +43,6 @@ use super::{
|
||||
};
|
||||
use crate::io::{self, OwnedFd};
|
||||
use crate::net::{SocketAddrAny, SocketAddrUnix, SocketAddrV4, SocketAddrV6};
|
||||
use core::convert::TryInto;
|
||||
use core::mem::MaybeUninit;
|
||||
#[cfg(not(target_arch = "x86"))]
|
||||
use linux_raw_sys::general::{
|
||||
@@ -828,7 +827,6 @@ pub(crate) mod sockopt {
|
||||
use crate::io;
|
||||
use crate::net::sockopt::Timeout;
|
||||
use crate::net::{Ipv4Addr, Ipv6Addr, SocketType};
|
||||
use core::convert::TryInto;
|
||||
use core::time::Duration;
|
||||
|
||||
// TODO use Duration::ZERO when we don't need 1.51 support
|
||||
|
||||
@@ -60,8 +60,6 @@ use crate::process::{
|
||||
use crate::time::NanosleepRelativeResult;
|
||||
use alloc::borrow::Cow;
|
||||
use alloc::vec::Vec;
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
use core::convert::TryInto;
|
||||
use core::mem::{size_of_val, MaybeUninit};
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))]
|
||||
use linux_raw_sys::general::__NR_epoll_pwait;
|
||||
|
||||
Reference in New Issue
Block a user