Skip to content

Commit

Permalink
Merge pull request rust-lang#4 from andjo403/master
Browse files Browse the repository at this point in the history
Depend on only one version of winapi
  • Loading branch information
alexcrichton authored May 10, 2018
2 parents 5673c9a + 152407f commit 2e01bd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ license = "MIT/Apache-2.0"

[target."cfg(windows)".dependencies]
scopeguard = "0.3"
winapi = { version = "0.3", features = ["errhandlingapi", "handleapi", "processthreadsapi", "std", "winerror", "winnt"] }
userenv-sys = "0.2.0"
winapi = { version = "0.3", features = ["errhandlingapi", "handleapi", "processthreadsapi", "std", "winerror", "winnt", "userenv"] }

4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
extern crate scopeguard;
#[cfg(windows)]
extern crate winapi;
#[cfg(windows)]
extern crate userenv;

#[cfg(windows)]
use winapi::shared::minwindef::DWORD;
Expand Down Expand Up @@ -68,7 +66,7 @@ pub fn home_dir() -> Option<PathBuf> {
#[cfg(windows)]
fn home_dir_() -> Option<PathBuf> {
use std::ptr;
use userenv::GetUserProfileDirectoryW;
use winapi::um::userenv::GetUserProfileDirectoryW;
use winapi::shared::winerror::ERROR_INSUFFICIENT_BUFFER;
use winapi::um::errhandlingapi::GetLastError;
use winapi::um::handleapi::CloseHandle;
Expand Down

0 comments on commit 2e01bd4

Please sign in to comment.