summaryrefslogtreecommitdiff
path: root/core/ops.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-01-24 15:10:49 -0500
committerGitHub <noreply@github.com>2020-01-24 15:10:49 -0500
commit5e32c5ea448563be91017d71bab060c8a6bd90fe (patch)
treeaa9e731b9f4b9f6bc28beab23e7575d43bc14653 /core/ops.rs
parent86726f88f1b6fd168fbd5b0d7e01b027cfc268ac (diff)
s/PinnedBuf/ZeroCopyBuf (#3782)
Diffstat (limited to 'core/ops.rs')
-rw-r--r--core/ops.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/ops.rs b/core/ops.rs
index e0bdb0184..f1798a398 100644
--- a/core/ops.rs
+++ b/core/ops.rs
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-use crate::PinnedBuf;
+use crate::ZeroCopyBuf;
use futures::Future;
use std::collections::HashMap;
use std::pin::Pin;
@@ -32,7 +32,7 @@ pub type CoreOp = Op<CoreError>;
/// Main type describing op
pub type OpDispatcher =
- dyn Fn(&[u8], Option<PinnedBuf>) -> CoreOp + Send + Sync + 'static;
+ dyn Fn(&[u8], Option<ZeroCopyBuf>) -> CoreOp + Send + Sync + 'static;
#[derive(Default)]
pub struct OpRegistry {
@@ -53,7 +53,7 @@ impl OpRegistry {
pub fn register<F>(&self, name: &str, op: F) -> OpId
where
- F: Fn(&[u8], Option<PinnedBuf>) -> CoreOp + Send + Sync + 'static,
+ F: Fn(&[u8], Option<ZeroCopyBuf>) -> CoreOp + Send + Sync + 'static,
{
let mut lock = self.dispatchers.write().unwrap();
let op_id = lock.len() as u32;
@@ -82,7 +82,7 @@ impl OpRegistry {
&self,
op_id: OpId,
control: &[u8],
- zero_copy_buf: Option<PinnedBuf>,
+ zero_copy_buf: Option<ZeroCopyBuf>,
) -> Option<CoreOp> {
// Op with id 0 has special meaning - it's a special op that is always
// provided to retrieve op id map. The map consists of name to `OpId`