Hide warnings which require bumping Rust compiler version

This commit is contained in:
Rafał Harabień 2019-07-17 20:47:03 +02:00
parent 59ef23ec98
commit 082e79e321
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,5 @@
#[cfg(all(not(feature = "std"), feature = "alloc"))] #[cfg(all(not(feature = "std"), feature = "alloc"))]
use alloc::{string::String, vec::Vec}; use alloc::string::String;
use core::char; use core::char;
use core::iter::FromIterator; use core::iter::FromIterator;
use core::{fmt, str}; use core::{fmt, str};

View File

@ -58,6 +58,12 @@
#![cfg_attr(all(not(feature = "std"), feature = "alloc"), feature(alloc))] #![cfg_attr(all(not(feature = "std"), feature = "alloc"), feature(alloc))]
// Disable warnings to not clutter code with cfg too much // Disable warnings to not clutter code with cfg too much
#![cfg_attr(not(feature = "alloc"), allow(dead_code, unused_imports))] #![cfg_attr(not(feature = "alloc"), allow(dead_code, unused_imports))]
// Inclusive ranges requires Rust 1.26.0
#![allow(ellipsis_inclusive_range_patterns)]
// `dyn` syntax requires Rust 1.27.0
#![allow(bare_trait_objects)]
// `alloc` compiler feature is needed in Rust before 1.36
#![cfg_attr(all(not(feature = "std"), feature = "alloc"), allow(stable_features))]
extern crate byteorder; extern crate byteorder;