diff --git a/Cargo.lock b/Cargo.lock index 91be92c9..4375d58b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2691,9 +2691,9 @@ dependencies = [ [[package]] name = "typed-path" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb9adcf07a4ad4233bc70d3a609dd1cc831da1f8d851cf62d6327769d08179f" +checksum = "bbb9d13b8242894ff21f9990082b90a6410a43dcc6029ac4227a1467853ba781" [[package]] name = "typenum" diff --git a/tough/Cargo.toml b/tough/Cargo.toml index 15c35592..8dfff961 100644 --- a/tough/Cargo.toml +++ b/tough/Cargo.toml @@ -24,7 +24,7 @@ serde_json = "1" serde_plain = "1" snafu = "0.7" tempfile = "3" -typed-path = "0.4" +typed-path = "0.6" untrusted = "0.7" url = "2" walkdir = "2" diff --git a/tough/src/target_name.rs b/tough/src/target_name.rs index b9ec4b10..5afc7259 100644 --- a/tough/src/target_name.rs +++ b/tough/src/target_name.rs @@ -4,6 +4,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer}; use snafu::{ensure, OptionExt}; use std::convert::TryFrom; use std::str::FromStr; +use typed_path::constants::unix::SEPARATOR_STR; use typed_path::{Component, UnixPath, UnixPathBuf}; /// Represents the name of a target in the repository. Path-like constructs are resolved (e.g. @@ -137,7 +138,7 @@ fn clean_name(name: &str) -> Result { // If the first component isn't the main separator ( unix `/`, windows '\' ) // then there is a bug or behavior change in absolutize_from. ensure!( - first_component == typed_path::unix::SEPARATOR_STR.as_bytes(), + first_component == SEPARATOR_STR.as_bytes(), error::TargetNameRootMissingSnafu { name } );