Mercurial > hg-stable
changeset 35603:11c86ab69e67
rust: move import of PathBuf
By moving it to the single function that uses it, we eliminate a
#cfg.
Differential Revision: https://phab.mercurial-scm.org/D1845
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 10 Jan 2018 19:23:36 -0800 |
parents | 998b585f156c |
children | 74bec9e74831 |
files | rust/hgcli/build.rs |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hgcli/build.rs Wed Jan 10 21:09:57 2018 -0800 +++ b/rust/hgcli/build.rs Wed Jan 10 19:23:36 2018 -0800 @@ -8,9 +8,6 @@ use std::collections::HashMap; use std::env; use std::path::Path; -#[cfg(target_os = "windows")] -use std::path::PathBuf; - use std::process::Command; struct PythonConfig { @@ -77,6 +74,8 @@ #[cfg(target_os = "windows")] fn have_shared(config: &PythonConfig) -> bool { + use std::path::PathBuf; + // python27.dll should exist next to python2.7.exe. let mut dll = PathBuf::from(&config.python); dll.pop();