From f26c9f01ce30b7911457e9c56112445c661ff280 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sun, 13 Jun 2021 22:20:36 -0700 Subject: [PATCH] working_copy: silence some warnings about unused code on Windows --- lib/src/working_copy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/working_copy.rs b/lib/src/working_copy.rs index 3dc36afb1..bce6686e4 100644 --- a/lib/src/working_copy.rs +++ b/lib/src/working_copy.rs @@ -23,8 +23,6 @@ use std::ops::Bound; use std::os::unix::fs::symlink; #[cfg(unix)] use std::os::unix::fs::PermissionsExt; -#[cfg(windows)] -use std::os::windows::fs::symlink_file; use std::path::{Path, PathBuf}; use std::sync::Arc; use std::time::UNIX_EPOCH; @@ -453,6 +451,7 @@ impl TreeState { file_state } + #[cfg_attr(windows, allow(unused_variables))] fn write_symlink(&self, disk_path: &Path, path: &RepoPath, id: &SymlinkId) -> FileState { create_parent_dirs(disk_path); #[cfg(windows)] @@ -468,6 +467,7 @@ impl TreeState { self.file_state(&disk_path).unwrap() } + #[cfg_attr(windows, allow(unused_variables))] fn set_executable(&self, disk_path: &Path, executable: bool) { #[cfg(windows)] {