diff --git a/cargo-miri/bin.rs b/cargo-miri/bin.rs index 852dbd7d3ea2..6d4c51256feb 100644 --- a/cargo-miri/bin.rs +++ b/cargo-miri/bin.rs @@ -257,8 +257,7 @@ fn setup(subcommand: MiriCommand) { // Determine where the rust sources are located. `XARGO_RUST_SRC` env var trumps everything. let rust_src = match std::env::var_os("XARGO_RUST_SRC") { - Some(val) => { - let path = PathBuf::from(val); + Some(path) => { // Make path absolute, but not via `canonicalize` (which does not work very well on Windows). env::current_dir().unwrap().join(path) }