Skip to content
Myr

Fix unused OnceLock import lint on Windows

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ross Smyth · committed by Ross Smyth · parent 9f0fea6 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:src/hyperlink.rs+4 added-4 removed
1use crate::filesystem::absolute_path;2use std::fmt::{self, Formatter, Write};3use std::path::{Path, PathBuf};4use std::sync::OnceLock;45pub(crate) struct PathUrl(PathBuf);68#[cfg(unix)]9static HOSTNAME: OnceLock<String> = OnceLock::new();107impl PathUrl {8 pub(crate) fn new(path: &Path) -> Option<PathUrl> {9 Some(PathUrl(absolute_path(path).ok()?))10 }
30 unmodified lines
41}4243#[cfg(unix)]44fn host() -> &'static str {45 use std::sync::OnceLock;4647 static HOSTNAME: OnceLock<String> = OnceLock::new();4849 HOSTNAME50 .get_or_init(|| {51 nix::unistd::gethostname()52 .ok()
35 unmodified lines