mirror of
https://github.com/denoland/deno.git
synced 2025-01-09 15:48:16 -05:00
refactor: use join instead of format! (#10921)
This commit is contained in:
parent
6091ea098a
commit
fe11495920
1 changed files with 4 additions and 5 deletions
|
@ -329,8 +329,7 @@ fn print_cache_info(
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_types(unstable: bool) -> String {
|
pub fn get_types(unstable: bool) -> String {
|
||||||
let mut types = format!(
|
let mut types = vec![
|
||||||
"{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}",
|
|
||||||
crate::tsc::DENO_NS_LIB,
|
crate::tsc::DENO_NS_LIB,
|
||||||
crate::tsc::DENO_CONSOLE_LIB,
|
crate::tsc::DENO_CONSOLE_LIB,
|
||||||
crate::tsc::DENO_URL_LIB,
|
crate::tsc::DENO_URL_LIB,
|
||||||
|
@ -343,13 +342,13 @@ pub fn get_types(unstable: bool) -> String {
|
||||||
crate::tsc::DENO_BROADCAST_CHANNEL_LIB,
|
crate::tsc::DENO_BROADCAST_CHANNEL_LIB,
|
||||||
crate::tsc::SHARED_GLOBALS_LIB,
|
crate::tsc::SHARED_GLOBALS_LIB,
|
||||||
crate::tsc::WINDOW_LIB,
|
crate::tsc::WINDOW_LIB,
|
||||||
);
|
];
|
||||||
|
|
||||||
if unstable {
|
if unstable {
|
||||||
types.push_str(&format!("\n{}", crate::tsc::UNSTABLE_NS_LIB,));
|
types.push(crate::tsc::UNSTABLE_NS_LIB);
|
||||||
}
|
}
|
||||||
|
|
||||||
types
|
types.join("\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn compile_command(
|
async fn compile_command(
|
||||||
|
|
Loading…
Reference in a new issue