paths: Replace lazy_static!
with OnceLock
(#13213)
This PR replaces the `lazy_static!` usages in the `paths` crate with `OnceLock` from the standard library. This allows us to drop the `lazy_static` dependency from this crate. The paths are now exposed as accessor functions that reference a private static value. Release Notes: - N/A
This commit is contained in:
parent
ba59e66314
commit
81475ac4cd
27 changed files with 322 additions and 172 deletions
|
@ -220,7 +220,7 @@ mod linux {
|
|||
}
|
||||
|
||||
fn launch(&self, ipc_url: String) -> anyhow::Result<()> {
|
||||
let sock_path = paths::SUPPORT_DIR.join(format!("zed-{}.sock", *RELEASE_CHANNEL));
|
||||
let sock_path = paths::support_dir().join(format!("zed-{}.sock", *RELEASE_CHANNEL));
|
||||
let sock = UnixDatagram::unbound()?;
|
||||
if sock.connect(&sock_path).is_err() {
|
||||
self.boot_background(ipc_url)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue