From c5302a0587bfdc8a78e8edf7429772f471c47304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 28 Mar 2023 23:52:08 +0200 Subject: refactor(ext/node): change extension type parameter (#18483) This commit changes the type parameter for "deno_node" extension, from `P: NodePermission` to `Env: NodeEnv`. `NodeEnv` is a new trait that has associated type `P: NodePermission`. This is a stepping stone to support swappable file system for the extension, that will be added as a second associated type to the `NodeEnv` trait. --- runtime/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/lib.rs') diff --git a/runtime/lib.rs b/runtime/lib.rs index 02d52cd5a..57108aa7e 100644 --- a/runtime/lib.rs +++ b/runtime/lib.rs @@ -36,3 +36,8 @@ pub mod worker; mod worker_bootstrap; pub use worker_bootstrap::BootstrapOptions; + +pub struct RuntimeNodeEnv; +impl deno_node::NodeEnv for RuntimeNodeEnv { + type P = permissions::PermissionsContainer; +} -- cgit v1.2.3