From 24225ce7afcae44c11b96ce89afd5882ef7a3d61 Mon Sep 17 00:00:00 2001 From: Dock O'Neal Date: Tue, 21 Nov 2017 23:49:19 -0500 Subject: [PATCH] Fixed syntax for non windows. Added a precompiler guard for std::env --- src/output.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output.rs b/src/output.rs index 0e11d08..095e156 100644 --- a/src/output.rs +++ b/src/output.rs @@ -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, separator: str) -> io::Result<()> { +fn write_entry_uncolorized(entry: Cow, separator: &'static str) -> io::Result<()> { write!(&mut io::stdout(), "{}{}", entry, separator) }