Skip to content

Commit

Permalink
update http requirement from 0.1 to 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
schrieveslaach committed Jan 6, 2020
1 parent 3b0d489 commit ca37718
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tag-prefix = ""
base64 = "0.11"
error-chain = { version = "0.12", default-features = false }
futures = "0.1"
http = "0.1"
http = "0.2"
libflate = "0.1"
log = "0.4"
mime = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions src/v2/manifest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Client {
Some(content_digest_value) => Some(
content_digest_value
.to_str()
.map_err(Error::from)?
.map_err(|e| Error::from(format!("{}", e)))?
.to_string(),
),
None => {
Expand Down Expand Up @@ -277,7 +277,7 @@ fn to_mimes(v: &[&str]) -> Result<Vec<mime::Mime>> {

// Evaluate the `MediaTypes` from the the request header.
fn evaluate_media_type(
content_type: Option<&http::header::HeaderValue>,
content_type: Option<&reqwest::header::HeaderValue>,
url: &Url,
) -> Result<mediatypes::MediaTypes> {
let header_content_type = content_type
Expand Down
2 changes: 1 addition & 1 deletion src/v2/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Client {
let ct_hdr = resp.headers().get(header::CONTENT_TYPE).cloned();
let ok = match ct_hdr {
None => false,
Some(ref ct) => ct.to_str()?.starts_with("application/json"),
Some(ref ct) => ct.to_str().map_err(|e| Error::from(format!("{}", e)))?.starts_with("application/json"),
};
if !ok {
// TODO:(steveeJ): Make this an error once Satellite
Expand Down

0 comments on commit ca37718

Please sign in to comment.