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 /ext/tls | |
parent | 3db18bf9e6466c74efd9052df4d372ea0b581154 (diff) |
refactor: use `once_cell` instead of `lazy_static` (#13135)
Diffstat (limited to 'ext/tls')
-rw-r--r-- | ext/tls/Cargo.toml | 2 | ||||
-rw-r--r-- | ext/tls/lib.rs | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/ext/tls/Cargo.toml b/ext/tls/Cargo.toml index 2a757f62d..c3bdb5cab 100644 --- a/ext/tls/Cargo.toml +++ b/ext/tls/Cargo.toml @@ -15,7 +15,7 @@ path = "lib.rs" [dependencies] deno_core = { version = "0.111.0", path = "../../core" } -lazy_static = "1.4.0" +once_cell = "=1.9.0" rustls = { version = "0.20", features = ["dangerous_configuration"] } rustls-native-certs = "0.6.1" rustls-pemfile = "0.2.1" diff --git a/ext/tls/lib.rs b/ext/tls/lib.rs index bcaf0f1be..a6775b95d 100644 --- a/ext/tls/lib.rs +++ b/ext/tls/lib.rs @@ -89,11 +89,6 @@ pub struct BasicAuth { pub password: String, } -lazy_static::lazy_static! { - static ref CLIENT_SESSION_MEMORY_CACHE: Arc<ClientSessionMemoryCache> = - Arc::new(ClientSessionMemoryCache::default()); -} - #[derive(Default)] struct ClientSessionMemoryCache(Mutex<HashMap<Vec<u8>, Vec<u8>>>); |