Simplify allocation strategy for now

Not having `unsafe_no_drop_flag` caused some weirdness with optimizing buffers
and bytes. For now, remeove it.
This commit is contained in:
Carl Lerche
2016-08-11 01:36:16 -07:00
parent 04e0ac75e2
commit fbebb19a02
11 changed files with 144 additions and 302 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ mod test_seq;
mod test_small;
// == Pool
mod test_pool;
// mod test_pool;
fn gen_bytes(n: usize) -> Vec<u8> {
(0..n).map(|_| random()).collect()
+3 -1
View File
@@ -1,5 +1,4 @@
use bytes::{Buf, MutBuf, AppendBuf};
use bytes::alloc::Pool;
#[test]
pub fn test_initial_buf_empty() {
@@ -29,8 +28,10 @@ pub fn test_initial_buf_empty() {
}
}
/*
#[test]
pub fn test_append_buf_from_pool() {
use bytes::alloc::Pool;
let pool = Pool::with_capacity(2, 256);
// Run in a loop a bunch in hope that if there is a memory issue, it will
@@ -58,3 +59,4 @@ pub fn test_append_buf_from_pool() {
assert_eq!(dst, b"hello world");
}
}
*/