From 65b56d27d5a2665c33bc5bd306ef9fe83d8c2789 Mon Sep 17 00:00:00 2001 From: Alexei Samokvalov Date: Tue, 15 Oct 2019 21:43:58 +0200 Subject: [PATCH] Remove warnings on windows --- src/util.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util.rs b/src/util.rs index bf7ecd2..c4a782f 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,5 +1,4 @@ -use std::{env, fs}; -use std::fs::{Permissions}; +use std::env; use std::path::PathBuf; @@ -11,9 +10,10 @@ pub fn path_to_absolute(path: &str) -> PathBuf { #[cfg(target_family = "unix")] pub fn set_permissions(path: &PathBuf, mode: u32) { + use std::fs::{self, Permissions}; use std::os::unix::fs::PermissionsExt; fs::set_permissions(path, Permissions::from_mode(mode)).expect("set file permissions"); } #[cfg(target_family = "windows")] -pub fn set_permissions(path: &PathBuf, mode: u32) {} \ No newline at end of file +pub fn set_permissions(_path: &PathBuf, _mode: u32) {} \ No newline at end of file