1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00

refactor: use default implementation of BootstrapOptions (#18439)

Drive-by cleanup while I was looking into serialization of
BootstrapOptions.
There's no need to use non-default implementation in these places.
This commit is contained in:
Bartek Iwańczuk 2023-03-26 06:38:45 +02:00 committed by Matt Mastracci
parent 07f61c7535
commit d676944536
2 changed files with 2 additions and 30 deletions

View file

@ -742,21 +742,7 @@ mod tests {
let permissions = PermissionsContainer::new(Permissions::default()); let permissions = PermissionsContainer::new(Permissions::default());
let options = WorkerOptions { let options = WorkerOptions {
bootstrap: BootstrapOptions { bootstrap: BootstrapOptions::default(),
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,
},
extensions: vec![], extensions: vec![],
startup_snapshot: Some(crate::js::deno_isolate_init()), startup_snapshot: Some(crate::js::deno_isolate_init()),
unsafely_ignore_certificate_errors: None, unsafely_ignore_certificate_errors: None,

View file

@ -28,21 +28,7 @@ async fn main() -> Result<(), AnyError> {
}); });
let options = WorkerOptions { let options = WorkerOptions {
bootstrap: BootstrapOptions { bootstrap: BootstrapOptions::default(),
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,
},
extensions: vec![], extensions: vec![],
startup_snapshot: None, startup_snapshot: None,
unsafely_ignore_certificate_errors: None, unsafely_ignore_certificate_errors: None,