Fixed syntax for non windows. Added a precompiler guard for std::env

This commit is contained in:
Dock O'Neal 2017-11-21 23:49:19 -05:00
parent d94e2ae027
commit 24225ce7af
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ use std::ops::Deref;
use std::path::{self, Path, PathBuf, Component};
#[cfg(any(unix, target_os = "redox"))]
use std::os::unix::fs::PermissionsExt;
#[cfg(windows)]
use std::env;
use std::borrow::Cow;
@ -91,7 +92,7 @@ fn print_entry_colorized(path: &Path, config: &FdOptions, ls_colors: &LsColors)
}
#[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)
}