mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-30 11:31:13 +00:00
working_copy: avoid an unused variable on Windows
This commit is contained in:
parent
fb41ef4fa0
commit
abc7312dbc
@ -999,7 +999,7 @@ impl TreeState {
|
|||||||
let executable = *executable;
|
let executable = *executable;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
let executable = {
|
let executable = {
|
||||||
let _ = executable;
|
let () = executable; // use the variable
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
self.write_conflict_to_store(repo_path, disk_path, conflict_id.clone(), executable)
|
self.write_conflict_to_store(repo_path, disk_path, conflict_id.clone(), executable)
|
||||||
@ -1009,12 +1009,14 @@ impl TreeState {
|
|||||||
let id = self.write_file_to_store(repo_path, disk_path)?;
|
let id = self.write_file_to_store(repo_path, disk_path)?;
|
||||||
// On Windows, we preserve the executable bit from the current tree.
|
// On Windows, we preserve the executable bit from the current tree.
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
let executable =
|
let executable = {
|
||||||
|
let () = executable; // use the variable
|
||||||
if let Some(TreeValue::File { id: _, executable }) = current_tree_value {
|
if let Some(TreeValue::File { id: _, executable }) = current_tree_value {
|
||||||
executable
|
executable
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
};
|
}
|
||||||
|
};
|
||||||
Ok(TreeValue::File { id, executable })
|
Ok(TreeValue::File { id, executable })
|
||||||
}
|
}
|
||||||
FileType::Symlink => {
|
FileType::Symlink => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user