Skip to content

Commit 545e84b

Browse files
committed
Bump version to 0.4.0
Re-exports std::io and std::error in 'std' feature
1 parent 7bf2611 commit 545e84b

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "core2"
3-
version = "0.3.3"
3+
version = "0.4.0"
44
authors = ["Brendan Molloy <[email protected]>"]
55
description = "The bare essentials of std::io for use in no_std. Alloc support is optional."
66
license = "Apache-2.0 OR MIT"

src/error.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// coherence challenge (e.g., specialization, neg impls, etc) we can
1212
// reconsider what crate these items belong in.
1313

14+
#[allow(deprecated)]
1415
use core::alloc::LayoutErr;
1516

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

326+
#[allow(deprecated)]
325327
impl Error for LayoutErr {}
326328

327329
impl Error for core::str::ParseBoolError {}

src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@
44
#![cfg_attr(not(feature = "std"), no_std)]
55
#![cfg_attr(feature = "std", allow(dead_code))]
66

7+
#[cfg(not(feature = "std"))]
78
pub mod error;
9+
10+
#[cfg(feature = "std")]
11+
pub use std::error as error;
12+
13+
#[cfg(not(feature = "std"))]
814
pub mod io;
915

16+
#[cfg(feature = "std")]
17+
pub use std::io as io;
18+
1019
#[cfg(feature = "alloc")]
1120
extern crate alloc;

0 commit comments

Comments
 (0)