Fix no_std build with "alloc" feature in Rust 1.29 and newer
This commit is contained in:
parent
0792b167ae
commit
240fd01a9d
@ -18,7 +18,11 @@ matrix:
|
||||
# See: https://github.com/BurntSushi/byteorder/pull/150
|
||||
- cargo update && cargo update -p byteorder --precise 1.2.7
|
||||
- cargo build --no-default-features --features core_io
|
||||
- cargo build --no-default-features --features core_io,alloc,core_io/collections
|
||||
- cargo build --no-default-features --features core_io,alloc
|
||||
- rust: nightly-2019-07-01
|
||||
script:
|
||||
- cargo build --no-default-features --features core_io
|
||||
- cargo build --no-default-features --features core_io,alloc
|
||||
|
||||
allow_failures:
|
||||
- rust: nightly
|
||||
|
@ -1,5 +1,5 @@
|
||||
#[cfg(all(not(feature = "std"), feature = "alloc"))]
|
||||
use alloc::Vec;
|
||||
use alloc::vec::Vec;
|
||||
use core::{char, cmp, num, str};
|
||||
#[cfg(feature = "alloc")]
|
||||
use core::{iter, slice};
|
||||
|
@ -1,5 +1,5 @@
|
||||
#[cfg(all(not(feature = "std"), feature = "alloc"))]
|
||||
use alloc::{String, Vec};
|
||||
use alloc::{string::String, vec::Vec};
|
||||
use core::char;
|
||||
use core::iter::FromIterator;
|
||||
use core::{fmt, str};
|
||||
|
Loading…
Reference in New Issue
Block a user