Skip to content

Commit

Permalink
Bump version to 0.4.0
Browse files Browse the repository at this point in the history
Re-exports std::io and std::error in 'std' feature
  • Loading branch information
bbqsrc committed Jan 29, 2022
1 parent 7bf2611 commit 545e84b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "core2"
version = "0.3.3"
version = "0.4.0"
authors = ["Brendan Molloy <[email protected]>"]
description = "The bare essentials of std::io for use in no_std. Alloc support is optional."
license = "Apache-2.0 OR MIT"
Expand Down
2 changes: 2 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// coherence challenge (e.g., specialization, neg impls, etc) we can
// reconsider what crate these items belong in.

#[allow(deprecated)]
use core::alloc::LayoutErr;

use core::any::TypeId;
Expand Down Expand Up @@ -322,6 +323,7 @@ impl<'a> From<Cow<'a, str>> for Box<dyn Error> {
#[cfg(feature = "nightly")]
impl Error for ! {}

#[allow(deprecated)]
impl Error for LayoutErr {}

impl Error for core::str::ParseBoolError {}
Expand Down
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(feature = "std", allow(dead_code))]

#[cfg(not(feature = "std"))]
pub mod error;

#[cfg(feature = "std")]
pub use std::error as error;

#[cfg(not(feature = "std"))]
pub mod io;

#[cfg(feature = "std")]
pub use std::io as io;

#[cfg(feature = "alloc")]
extern crate alloc;

0 comments on commit 545e84b

Please sign in to comment.