summaryrefslogtreecommitdiff
path: root/ext/fs/ops.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-10-04 21:42:17 +0200
committerGitHub <noreply@github.com>2023-10-04 21:42:17 +0200
commita5568066b3d979111134029f9e4f0c1b462b948e (patch)
tree14c4233cc01d55eda7f608b5194f6b088264b52e /ext/fs/ops.rs
parent9a46a824bd897e240af8a14f9d950ab6d95f42a5 (diff)
refactor: use deno_core::FeatureChecker for unstable checks (#20765)
Diffstat (limited to 'ext/fs/ops.rs')
-rw-r--r--ext/fs/ops.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs
index bc09a4a25..9fa8cf918 100644
--- a/ext/fs/ops.rs
+++ b/ext/fs/ops.rs
@@ -27,7 +27,6 @@ use rand::Rng;
use serde::Serialize;
use crate::check_unstable;
-use crate::check_unstable2;
use crate::interface::FileSystemRc;
use crate::interface::FsDirEntry;
use crate::interface::FsFileType;
@@ -1422,7 +1421,7 @@ pub async fn op_fs_flock_async(
#[smi] rid: ResourceId,
exclusive: bool,
) -> Result<(), AnyError> {
- check_unstable2(&state, "Deno.flock");
+ check_unstable(&state.borrow(), "Deno.flock");
let file = FileResource::get_file(&state.borrow(), rid)?;
file.lock_async(exclusive).await?;
Ok(())
@@ -1444,7 +1443,7 @@ pub async fn op_fs_funlock_async(
state: Rc<RefCell<OpState>>,
#[smi] rid: ResourceId,
) -> Result<(), AnyError> {
- check_unstable2(&state, "Deno.funlock");
+ check_unstable(&state.borrow(), "Deno.funlock");
let file = FileResource::get_file(&state.borrow(), rid)?;
file.unlock_async().await?;
Ok(())