summaryrefslogtreecommitdiff
path: root/cli/flags.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/flags.rs')
-rw-r--r--cli/flags.rs22
1 files changed, 10 insertions, 12 deletions
diff --git a/cli/flags.rs b/cli/flags.rs
index d4ba685fb..7255502fe 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -384,19 +384,17 @@ impl Flags {
vec![]
}
}
-}
-impl From<Flags> for PermissionsOptions {
- fn from(flags: Flags) -> Self {
- Self {
- allow_env: flags.allow_env,
- allow_hrtime: flags.allow_hrtime,
- allow_net: flags.allow_net,
- allow_ffi: flags.allow_ffi,
- allow_read: flags.allow_read,
- allow_run: flags.allow_run,
- allow_write: flags.allow_write,
- prompt: flags.prompt,
+ pub fn permissions_options(&self) -> PermissionsOptions {
+ PermissionsOptions {
+ allow_env: self.allow_env.clone(),
+ allow_hrtime: self.allow_hrtime,
+ allow_net: self.allow_net.clone(),
+ allow_ffi: self.allow_ffi.clone(),
+ allow_read: self.allow_read.clone(),
+ allow_run: self.allow_run.clone(),
+ allow_write: self.allow_write.clone(),
+ prompt: self.prompt,
}
}
}