From 5e32c5ea448563be91017d71bab060c8a6bd90fe Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 24 Jan 2020 15:10:49 -0500 Subject: s/PinnedBuf/ZeroCopyBuf (#3782) --- core/examples/http_bench.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'core/examples') diff --git a/core/examples/http_bench.rs b/core/examples/http_bench.rs index 5a5b43c51..8151c4575 100644 --- a/core/examples/http_bench.rs +++ b/core/examples/http_bench.rs @@ -108,12 +108,12 @@ fn test_record_from() { pub type HttpOp = dyn Future> + Send; pub type HttpOpHandler = - fn(record: Record, zero_copy_buf: Option) -> Pin>; + fn(record: Record, zero_copy_buf: Option) -> Pin>; fn http_op( handler: HttpOpHandler, -) -> impl Fn(&[u8], Option) -> CoreOp { - move |control: &[u8], zero_copy_buf: Option| -> CoreOp { +) -> impl Fn(&[u8], Option) -> CoreOp { + move |control: &[u8], zero_copy_buf: Option| -> CoreOp { let record = Record::from(control); let is_sync = record.promise_id == 0; let op = handler(record.clone(), zero_copy_buf); @@ -232,7 +232,7 @@ impl Future for Accept { fn op_accept( record: Record, - _zero_copy_buf: Option, + _zero_copy_buf: Option, ) -> Pin> { let rid = record.arg as u32; debug!("accept {}", rid); @@ -250,7 +250,7 @@ fn op_accept( fn op_listen( _record: Record, - _zero_copy_buf: Option, + _zero_copy_buf: Option, ) -> Pin> { debug!("listen"); let fut = async { @@ -266,7 +266,7 @@ fn op_listen( fn op_close( record: Record, - _zero_copy_buf: Option, + _zero_copy_buf: Option, ) -> Pin> { debug!("close"); let fut = async move { @@ -282,7 +282,7 @@ fn op_close( struct Read { rid: ResourceId, - buf: PinnedBuf, + buf: ZeroCopyBuf, } impl Future for Read { @@ -304,7 +304,7 @@ impl Future for Read { fn op_read( record: Record, - zero_copy_buf: Option, + zero_copy_buf: Option, ) -> Pin> { let rid = record.arg as u32; debug!("read rid={}", rid); @@ -325,7 +325,7 @@ fn op_read( struct Write { rid: ResourceId, - buf: PinnedBuf, + buf: ZeroCopyBuf, } impl Future for Write { @@ -347,7 +347,7 @@ impl Future for Write { fn op_write( record: Record, - zero_copy_buf: Option, + zero_copy_buf: Option, ) -> Pin> { let rid = record.arg as u32; debug!("write rid={}", rid); -- cgit v1.2.3