summaryrefslogtreecommitdiff
path: root/ext/cache
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-09-23 14:04:47 +0200
committerGitHub <noreply@github.com>2023-09-23 14:04:47 +0200
commit1ad097c4bf7fb6ba0c64c050224b39dba4ad8574 (patch)
tree7c970e49208b7a6b7b8227166ba8819ad3e0ecfb /ext/cache
parent75a724890d94267a02bd431f98d3d7d5866d95e7 (diff)
refactor: rewrite ops using i64/usize to op2 (#20647)
Diffstat (limited to 'ext/cache')
-rw-r--r--ext/cache/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/cache/lib.rs b/ext/cache/lib.rs
index 553dd1ee6..59be8cfdc 100644
--- a/ext/cache/lib.rs
+++ b/ext/cache/lib.rs
@@ -7,7 +7,6 @@ use std::sync::Arc;
use async_trait::async_trait;
use deno_core::error::AnyError;
-use deno_core::op;
use deno_core::op2;
use deno_core::serde::Deserialize;
use deno_core::serde::Serialize;
@@ -118,10 +117,11 @@ pub trait Cache: Clone + 'static {
-> Result<bool, AnyError>;
}
-#[op]
+#[op2(async)]
+#[number]
pub async fn op_cache_storage_open<CA>(
state: Rc<RefCell<OpState>>,
- cache_name: String,
+ #[string] cache_name: String,
) -> Result<i64, AnyError>
where
CA: Cache,