diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-09-18 15:20:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-18 09:20:55 -0400 |
commit | 7845740637eb646c0b13dc541f043fd65136fc03 (patch) | |
tree | 8576a376d72ffdfe4ffed983a2bed9e605d20e8b /cli/state.rs | |
parent | cead79f5b8ffd376d339b6e0c30e872bfe6820f6 (diff) |
refactor: deno_fetch op crate (#7524)
Diffstat (limited to 'cli/state.rs')
-rw-r--r-- | cli/state.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/state.rs b/cli/state.rs index 5f2aeb3ff..fdc61cf16 100644 --- a/cli/state.rs +++ b/cli/state.rs @@ -21,6 +21,7 @@ use std::cell::Cell; use std::cell::RefCell; use std::collections::HashMap; use std::path::Path; +use std::path::PathBuf; use std::pin::Pin; use std::rc::Rc; use std::str; @@ -315,3 +316,13 @@ impl CliState { } } } + +impl deno_fetch::FetchPermissions for CliState { + fn check_net_url(&self, url: &url::Url) -> Result<(), AnyError> { + CliState::check_net_url(self, url) + } + + fn check_read(&self, p: &PathBuf) -> Result<(), AnyError> { + CliState::check_read(self, p) + } +} |