summaryrefslogtreecommitdiff
path: root/ext/fetch/lib.rs
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-10-04 22:56:24 +0200
committerGitHub <noreply@github.com>2021-10-04 22:56:24 +0200
commit64a7187238c4f291f254bd6eb58138a3a6534898 (patch)
treef1d552ffdfab2324e818589b5d357a674dd22a2c /ext/fetch/lib.rs
parentc6ae41fd8701b0fc5735ae4a6fa288f5cb35f03a (diff)
chore: remove No*Permissions structs (#12316)
These are confusing. They say they are "for users that don't care about permissions", but that isn't correct. `NoTimersPermissions` disables permissions instead of enabling them. I would argue that implementors should decide what permissions they want themselves, and not take our opinionated permissions struct.
Diffstat (limited to 'ext/fetch/lib.rs')
-rw-r--r--ext/fetch/lib.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs
index b422c2741..dfb1ce059 100644
--- a/ext/fetch/lib.rs
+++ b/ext/fetch/lib.rs
@@ -120,19 +120,6 @@ pub trait FetchPermissions {
fn check_read(&mut self, _p: &Path) -> Result<(), AnyError>;
}
-/// For use with `op_fetch` when the user does not want permissions.
-pub struct NoFetchPermissions;
-
-impl FetchPermissions for NoFetchPermissions {
- fn check_net_url(&mut self, _url: &Url) -> Result<(), AnyError> {
- Ok(())
- }
-
- fn check_read(&mut self, _p: &Path) -> Result<(), AnyError> {
- Ok(())
- }
-}
-
pub fn get_declaration() -> PathBuf {
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lib.deno_fetch.d.ts")
}