Skip to content
Myr

Merge pull request #1596 from RossSmyth/WinLints

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

Fix up some lints on Windows

authored by Thayne McCombs · committed by GitHub · parents 8958a7b, 80a73fd · Browse files · 2 files+5 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

2 files+5 added−4 removed

  • other:+5 added−4 removed

2 files+5 added−4 removed

modified:src/config.rs+1 added
73 unmodified lines
74 /// how to style different filetypes.75 pub ls_colors: Option<LsColors>,7677 /// Whether or not we are writing to an interactive terminal78 #[cfg_attr(not(unix), allow(unused))]79 pub interactive_terminal: bool,8081 /// The type of file to search for. If set to `None`, all file types are displayed. If82 /// set to `Some(..)`, only the types that are specified are shown.
58 unmodified lines
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