brson / home

Canonical definitions of home_dir, CARGO_HOME, and RUSTUP_HOME
Apache License 2.0
63 stars 13 forks source link

0.4.1: windows build failure #7

Closed matthiaskrgr closed 5 years ago

matthiaskrgr commented 5 years ago

I upgraded home to 0.4.1 in cargo-cache https://github.com/matthiaskrgr/cargo-cache which caused a CI error / build failure on windows because home failed to build:

   Compiling home v0.4.1
error[E0308]: mismatched types
  --> C:\Users\travis\.cargo\registry\src\github.com-1ecc6299db9ec823\home-0.4.1\src\lib.rs:89:37
   |
89 |                 let _ = CloseHandle(*h);
   |                                     ^^ expected *-ptr, found enum `std::ffi::c_void`
   |
   = note: expected type `*mut std::ffi::c_void`
              found type `std::ffi::c_void`

https://travis-ci.org/matthiaskrgr/cargo-cache/jobs/568579013#L175

matthiaskrgr commented 5 years ago

cc @lzutao who updated scopeguard

            let _g = scopeguard::guard(token, |h| {
                let _ = CloseHandle(*h);
            });

perhaps this has to be

            let _g = scopeguard::guard(token, |mut h| {
                let _ = CloseHandle(*h);
            });

or something?