diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2021-12-19 02:44:42 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-18 16:14:42 -0500 |
commit | 6de53b631fcdb96d72639b6d2db3592d5fa8498d (patch) | |
tree | 9a93d868f5f434a4898f212cb6bd53e65ca49ce0 /cli/flags.rs | |
parent | 3db18bf9e6466c74efd9052df4d372ea0b581154 (diff) |
refactor: use `once_cell` instead of `lazy_static` (#13135)
Diffstat (limited to 'cli/flags.rs')
-rw-r--r-- | cli/flags.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 452c2fd9a..2cf79d44f 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -12,6 +12,7 @@ use deno_core::url::Url; use deno_runtime::permissions::PermissionsOptions; use log::debug; use log::Level; +use once_cell::sync::Lazy; use std::net::SocketAddr; use std::num::NonZeroU32; use std::num::NonZeroU8; @@ -19,8 +20,8 @@ use std::num::NonZeroUsize; use std::path::PathBuf; use std::str::FromStr; -lazy_static::lazy_static! { - static ref LONG_VERSION: String = format!( +static LONG_VERSION: Lazy<String> = Lazy::new(|| { + format!( "{} ({}, {})\nv8 {}\ntypescript {}", crate::version::deno(), if crate::version::is_canary() { @@ -31,8 +32,8 @@ lazy_static::lazy_static! { env!("TARGET"), deno_core::v8_version(), crate::version::TYPESCRIPT - ); -} + ) +}); #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] pub struct BundleFlags { |