File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#![ deny( warnings, rust_2018_idioms) ]
22
33use bytes:: Buf ;
4+ #[ cfg( feature = "std" ) ]
45use std:: io:: IoSlice ;
56
67#[ test]
@@ -42,6 +43,7 @@ fn test_get_u16_buffer_underflow() {
4243 buf. get_u16 ( ) ;
4344}
4445
46+ #[ cfg( feature = "std" ) ]
4547#[ test]
4648fn test_bufs_vec ( ) {
4749 let buf = & b"hello world" [ ..] ;
Original file line number Diff line number Diff line change 11#![ deny( warnings, rust_2018_idioms) ]
22
3- use bytes:: { buf:: IoSliceMut , BufMut , BytesMut } ;
4- use std:: usize;
5- use std:: fmt:: Write ;
3+ use bytes:: { BufMut , BytesMut } ;
4+ #[ cfg( feature = "std" ) ]
5+ use bytes:: buf:: IoSliceMut ;
6+ use core:: usize;
7+ use core:: fmt:: Write ;
68
79#[ test]
810fn test_vec_as_mut_buf ( ) {
@@ -64,6 +66,7 @@ fn test_clone() {
6466 assert ! ( buf != buf2) ;
6567}
6668
69+ #[ cfg( feature = "std" ) ]
6770#[ test]
6871fn test_bufs_vec_mut ( ) {
6972 let b1: & mut [ u8 ] = & mut [ ] ;
Original file line number Diff line number Diff line change 22
33use bytes:: { Buf , BufMut , Bytes } ;
44use bytes:: buf:: { BufExt , BufMutExt } ;
5+ #[ cfg( feature = "std" ) ]
56use std:: io:: IoSlice ;
67
78#[ test]
@@ -42,6 +43,7 @@ fn iterating_two_bufs() {
4243 assert_eq ! ( res, & b"helloworld" [ ..] ) ;
4344}
4445
46+ #[ cfg( feature = "std" ) ]
4547#[ test]
4648fn vectored_read ( ) {
4749 let a = Bytes :: from ( & b"hello" [ ..] ) ;
Original file line number Diff line number Diff line change 11#![ deny( warnings, rust_2018_idioms) ]
2+ #![ cfg( feature = "std" ) ]
23
34use std:: io:: { BufRead , Read } ;
45
You can’t perform that action at this time.
0 commit comments