std: move RawOsError to sys::io
This commit is contained in:
parent
693f365667
commit
aa73de400d
4 changed files with 8 additions and 6 deletions
|
|
@ -139,7 +139,7 @@ enum ErrorData<C> {
|
|||
///
|
||||
/// [`into`]: Into::into
|
||||
#[unstable(feature = "raw_os_error_ty", issue = "107792")]
|
||||
pub type RawOsError = sys::RawOsError;
|
||||
pub type RawOsError = sys::io::RawOsError;
|
||||
|
||||
// `#[repr(align(4))]` is probably redundant, it should have that value or
|
||||
// higher already. We include it just because repr_bitpacked.rs's encoding
|
||||
|
|
|
|||
|
|
@ -55,3 +55,8 @@ pub use kernel_copy::{CopyState, kernel_copy};
|
|||
// Bare metal platforms usually have very small amounts of RAM
|
||||
// (in the order of hundreds of KB)
|
||||
pub const DEFAULT_BUF_SIZE: usize = if cfg!(target_os = "espidf") { 512 } else { 8 * 1024 };
|
||||
|
||||
pub type RawOsError = cfg_select! {
|
||||
target_os = "uefi" => usize,
|
||||
_ => i32,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -92,6 +92,3 @@ pub const FULL_BACKTRACE_DEFAULT: bool = cfg_select! {
|
|||
target_os = "fuchsia" => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
#[cfg(not(target_os = "uefi"))]
|
||||
pub type RawOsError = i32;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
//! [`OsString`]: crate::ffi::OsString
|
||||
#![forbid(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::io::RawOsError;
|
||||
|
||||
pub mod helpers;
|
||||
pub mod os;
|
||||
pub mod time;
|
||||
|
|
@ -20,8 +22,6 @@ pub mod time;
|
|||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
pub type RawOsError = usize;
|
||||
|
||||
use crate::io as std_io;
|
||||
use crate::os::uefi;
|
||||
use crate::ptr::NonNull;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue