summaryrefslogtreecommitdiff
path: root/ext/io/lib.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-09-12 12:42:05 +0200
committerGitHub <noreply@github.com>2023-09-12 12:42:05 +0200
commitf32acb945e4f96b540c61705eb0d786fc4389d60 (patch)
treec5a286d5ded60971fc38638a205efbb3074f78f2 /ext/io/lib.rs
parent82c28640658df400e5bed2e208912247b1e83d0f (diff)
refactor: rewrite ext/io, ext/webstorage ops to op2 (#20461)
Diffstat (limited to 'ext/io/lib.rs')
-rw-r--r--ext/io/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/io/lib.rs b/ext/io/lib.rs
index 3d6ac0f37..eb26c495a 100644
--- a/ext/io/lib.rs
+++ b/ext/io/lib.rs
@@ -1,7 +1,7 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
use deno_core::error::AnyError;
-use deno_core::op;
+use deno_core::op2;
use deno_core::unsync::spawn_blocking;
use deno_core::AsyncMutFuture;
use deno_core::AsyncRefCell;
@@ -733,10 +733,10 @@ impl crate::fs::File for StdFileResourceInner {
}
// override op_print to use the stdout and stderr in the resource table
-#[op]
+#[op2(fast)]
pub fn op_print(
state: &mut OpState,
- msg: &str,
+ #[string] msg: &str,
is_err: bool,
) -> Result<(), AnyError> {
let rid = if is_err { 2 } else { 1 };