From 0a9c770fde5bb4fdc543dd36559c76e74dbf46e4 Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Sun, 4 Nov 2018 12:22:38 -0800 Subject: [PATCH] remove absolutize and do not canonicalize --- Cargo.lock | 19 ------------------- Cargo.toml | 1 - src/command/utils.rs | 8 +------- src/lib.rs | 1 - 4 files changed, 1 insertion(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7cc84310d..7b20a0fc2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -501,22 +501,6 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "path-absolutize" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "path-dedot 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "path-dedot" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "pkg-config" version = "0.3.14" @@ -985,7 +969,6 @@ dependencies = [ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "path-absolutize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1123,8 +1106,6 @@ dependencies = [ "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" -"checksum path-absolutize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd20546730045b90f32bf46ecaf86a825c6fe1c912be34e0b5828d0829acec7" -"checksum path-dedot 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d6c852f9c1fd5acf5ce337fc80323cc8d5232fb3fa0976be41817da2d980b47" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" "checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee" diff --git a/Cargo.toml b/Cargo.toml index 9cd9050d2..56392cfeb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,6 @@ indicatif = "0.9.0" lazy_static = "1.1.0" openssl = { version = '0.10.11', optional = true } parking_lot = "0.6" -path-absolutize = "1.1.1" serde = "1.0.74" serde_derive = "1.0.74" serde_json = "1.0.26" diff --git a/src/command/utils.rs b/src/command/utils.rs index 8879b878e..fee4d4f38 100644 --- a/src/command/utils.rs +++ b/src/command/utils.rs @@ -2,7 +2,6 @@ use emoji; use failure; -use path_absolutize::*; use progressbar::Step; use std::fs; use std::path::{Path, PathBuf}; @@ -11,12 +10,7 @@ use PBAR; /// If an explicit path is given, then use it, otherwise assume the current /// directory is the crate path. pub fn set_crate_path(path: Option) -> Result { - let crate_path = match path { - Some(p) => p, - None => PathBuf::from("."), - }; - let absolute_crate_path = crate_path.absolutize()?; - Ok(absolute_crate_path) + Ok(path.unwrap_or(PathBuf::from("."))) } /// Construct our `pkg` directory in the crate. diff --git a/src/lib.rs b/src/lib.rs index 830b6c405..ed2e390e1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,6 @@ extern crate indicatif; #[macro_use] extern crate lazy_static; extern crate parking_lot; -extern crate path_absolutize; #[macro_use] extern crate serde_derive; extern crate serde_json;