summaryrefslogtreecommitdiff
path: root/cli/ops
diff options
context:
space:
mode:
authorAxetroy <axetroy.dev@gmail.com>2019-12-23 22:59:44 +0800
committerRy Dahl <ry@tinyclouds.org>2019-12-23 09:59:44 -0500
commit3bb15ceaeaf5cd349afcb2e2d43374efd420aaef (patch)
treeb169369521f66bbca1c71a96f0059bef6d61fe00 /cli/ops
parente88c801e76c16d4c0a92702e248cf811038ed4ab (diff)
Upgrades rust to 1.40.0 (#3542)
Diffstat (limited to 'cli/ops')
-rw-r--r--cli/ops/errors.rs2
-rw-r--r--cli/ops/plugins.rs2
-rw-r--r--cli/ops/workers.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/cli/ops/errors.rs b/cli/ops/errors.rs
index 3d94c05c4..4ef912916 100644
--- a/cli/ops/errors.rs
+++ b/cli/ops/errors.rs
@@ -61,7 +61,7 @@ fn op_apply_source_map(
);
Ok(JsonOp::Sync(json!({
- "filename": orig_filename.to_string(),
+ "filename": orig_filename,
"line": orig_line as u32,
"column": orig_column as u32,
})))
diff --git a/cli/ops/plugins.rs b/cli/ops/plugins.rs
index 258cd2764..eb52b0717 100644
--- a/cli/ops/plugins.rs
+++ b/cli/ops/plugins.rs
@@ -9,7 +9,7 @@ use std::ffi::OsStr;
use std::sync::Arc;
pub fn init(i: &mut Isolate, s: &ThreadSafeState, r: Arc<deno::OpRegistry>) {
- let r_ = r.clone();
+ let r_ = r;
i.register_op(
"open_plugin",
s.core_op(json_op(s.stateful_op(move |state, args, zero_copy| {
diff --git a/cli/ops/workers.rs b/cli/ops/workers.rs
index 2b4d11e75..467d0bfb2 100644
--- a/cli/ops/workers.rs
+++ b/cli/ops/workers.rs
@@ -81,7 +81,7 @@ fn op_worker_get_message(
debug!("op_worker_get_message");
futures::future::ok(json!({
- "data": maybe_buf.map(|buf| buf.to_owned())
+ "data": maybe_buf.map(|buf| buf)
}))
});
@@ -261,7 +261,7 @@ fn op_host_get_message(
.map_err(move |_| -> ErrBox { unimplemented!() })
.and_then(move |maybe_buf| {
futures::future::ok(json!({
- "data": maybe_buf.map(|buf| buf.to_owned())
+ "data": maybe_buf.map(|buf| buf)
}))
});