mirror of https://github.com/sharkdp/fd.git
Fixed syntax for non windows. Added a precompiler guard for std::env
This commit is contained in:
parent
d94e2ae027
commit
24225ce7af
|
@ -15,6 +15,7 @@ use std::ops::Deref;
|
||||||
use std::path::{self, Path, PathBuf, Component};
|
use std::path::{self, Path, PathBuf, Component};
|
||||||
#[cfg(any(unix, target_os = "redox"))]
|
#[cfg(any(unix, target_os = "redox"))]
|
||||||
use std::os::unix::fs::PermissionsExt;
|
use std::os::unix::fs::PermissionsExt;
|
||||||
|
#[cfg(windows)]
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
|
@ -91,7 +92,7 @@ fn print_entry_colorized(path: &Path, config: &FdOptions, ls_colors: &LsColors)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
fn write_entry_uncolorized(entry: Cow<str>, separator: str) -> io::Result<()> {
|
fn write_entry_uncolorized(entry: Cow<str>, separator: &'static str) -> io::Result<()> {
|
||||||
write!(&mut io::stdout(), "{}{}", entry, separator)
|
write!(&mut io::stdout(), "{}{}", entry, separator)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue