Skip to content

Commit

Permalink
refactor: use default implementation of BootstrapOptions (denoland#18439
Browse files Browse the repository at this point in the history
)

Drive-by cleanup while I was looking into serialization of
BootstrapOptions.
There's no need to use non-default implementation in these places.
  • Loading branch information
bartlomieju committed Mar 26, 2023
1 parent 33362b8 commit 4d09b0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
16 changes: 1 addition & 15 deletions cli/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,21 +742,7 @@ mod tests {
let permissions = PermissionsContainer::new(Permissions::default());

let options = WorkerOptions {
bootstrap: BootstrapOptions {
args: vec![],
cpu_count: 1,
debug_flag: false,
enable_testing_features: false,
locale: deno_core::v8::icu::get_language_tag(),
location: None,
no_color: true,
is_tty: false,
runtime_version: "x".to_string(),
ts_version: "x".to_string(),
unstable: false,
user_agent: "x".to_string(),
inspect: false,
},
bootstrap: BootstrapOptions::default(),
extensions: vec![],
startup_snapshot: Some(crate::js::deno_isolate_init()),
unsafely_ignore_certificate_errors: None,
Expand Down
16 changes: 1 addition & 15 deletions runtime/examples/hello_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,7 @@ async fn main() -> Result<(), AnyError> {
});

let options = WorkerOptions {
bootstrap: BootstrapOptions {
args: vec![],
cpu_count: 1,
debug_flag: false,
enable_testing_features: false,
locale: deno_core::v8::icu::get_language_tag(),
location: None,
no_color: false,
is_tty: false,
runtime_version: "x".to_string(),
ts_version: "x".to_string(),
unstable: false,
user_agent: "hello_runtime".to_string(),
inspect: false,
},
bootstrap: BootstrapOptions::default(),
extensions: vec![],
startup_snapshot: None,
unsafely_ignore_certificate_errors: None,
Expand Down

0 comments on commit 4d09b0c

Please sign in to comment.