Fix tests for no_std build (#384)

This fixes `cargo test --no-default-features`.
This commit is contained in:
Cheng XU
2020-05-22 11:18:20 +09:00
committed by GitHub
parent fa464ca483
commit e8fa2511ff
4 changed files with 11 additions and 3 deletions
+2
View File
@@ -1,6 +1,7 @@
#![deny(warnings, rust_2018_idioms)]
use bytes::Buf;
#[cfg(feature = "std")]
use std::io::IoSlice;
#[test]
@@ -42,6 +43,7 @@ fn test_get_u16_buffer_underflow() {
buf.get_u16();
}
#[cfg(feature = "std")]
#[test]
fn test_bufs_vec() {
let buf = &b"hello world"[..];