summaryrefslogtreecommitdiff
path: root/core/examples
diff options
context:
space:
mode:
Diffstat (limited to 'core/examples')
-rw-r--r--core/examples/hello_world.rs1
-rw-r--r--core/examples/http_bench_json_ops.rs3
-rw-r--r--core/examples/schedule_task.rs2
3 files changed, 2 insertions, 4 deletions
diff --git a/core/examples/hello_world.rs b/core/examples/hello_world.rs
index bfca5447c..d5d7af94d 100644
--- a/core/examples/hello_world.rs
+++ b/core/examples/hello_world.rs
@@ -17,7 +17,6 @@ use deno_core::*;
fn op_sum(
_state: &mut OpState,
nums: Vec<f64>,
- _: (),
) -> Result<f64, deno_core::error::AnyError> {
// Sum inputs
let sum = nums.iter().fold(0.0, |a, v| a + v);
diff --git a/core/examples/http_bench_json_ops.rs b/core/examples/http_bench_json_ops.rs
index 3f608eeae..2068c3b85 100644
--- a/core/examples/http_bench_json_ops.rs
+++ b/core/examples/http_bench_json_ops.rs
@@ -135,7 +135,7 @@ fn create_js_runtime() -> JsRuntime {
}
#[op]
-fn op_listen(state: &mut OpState, _: (), _: ()) -> Result<ResourceId, Error> {
+fn op_listen(state: &mut OpState) -> Result<ResourceId, Error> {
log::debug!("listen");
let addr = "127.0.0.1:4544".parse::<SocketAddr>().unwrap();
let std_listener = std::net::TcpListener::bind(&addr)?;
@@ -149,7 +149,6 @@ fn op_listen(state: &mut OpState, _: (), _: ()) -> Result<ResourceId, Error> {
async fn op_accept(
state: Rc<RefCell<OpState>>,
rid: ResourceId,
- _: (),
) -> Result<ResourceId, Error> {
log::debug!("accept rid={}", rid);
diff --git a/core/examples/schedule_task.rs b/core/examples/schedule_task.rs
index 3ada86417..7812dcb49 100644
--- a/core/examples/schedule_task.rs
+++ b/core/examples/schedule_task.rs
@@ -62,7 +62,7 @@ fn main() {
}
#[op]
-fn op_schedule_task(state: &mut OpState, i: u8, _: ()) -> Result<(), Error> {
+fn op_schedule_task(state: &mut OpState, i: u8) -> Result<(), Error> {
let tx = state.borrow_mut::<mpsc::UnboundedSender<Task>>();
tx.unbounded_send(Box::new(move || println!("Hello, world! x{}", i)))
.expect("unbounded_send failed");