diff options
author | Luca Casonato <hello@lcas.dev> | 2021-10-04 22:56:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 22:56:24 +0200 |
commit | 64a7187238c4f291f254bd6eb58138a3a6534898 (patch) | |
tree | f1d552ffdfab2324e818589b5d357a674dd22a2c /ext/timers/lib.rs | |
parent | c6ae41fd8701b0fc5735ae4a6fa288f5cb35f03a (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/timers/lib.rs')
-rw-r--r-- | ext/timers/lib.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/ext/timers/lib.rs b/ext/timers/lib.rs index 2b9948d1f..384627c57 100644 --- a/ext/timers/lib.rs +++ b/ext/timers/lib.rs @@ -31,15 +31,6 @@ pub trait TimersPermission { fn check_unstable(&self, state: &OpState, api_name: &'static str); } -pub struct NoTimersPermission; - -impl TimersPermission for NoTimersPermission { - fn allow_hrtime(&mut self) -> bool { - false - } - fn check_unstable(&self, _: &OpState, _: &'static str) {} -} - pub fn init<P: TimersPermission + 'static>() -> Extension { Extension::builder() .js(include_js_files!( |