From e8ce405349f2473e1353632bd455261b8ef9d479 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 19 Feb 2020 12:27:22 +0100 Subject: update dependencies image should also be updated to 0.23, but imageproc currently still uses 0.22, so we need to match it. --- Cargo.toml | 4 ++-- src/api/mod.rs | 4 ++-- src/main.rs | 15 --------------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c90e22a..91a722c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,8 +10,8 @@ edition = "2018" image = "0.22" imageproc = "0.19" rusttype = "0.8" -reqwest = "0.9" -serde = "1.0" +reqwest = { version = "0.10", features = ["default-tls", "blocking", "json"] } +serde = { version = "1.0", features = ["std", "derive"] } serde_json = "1.0" clap = "2.33" xdg = "2.2.0" diff --git a/src/api/mod.rs b/src/api/mod.rs index c4aa1f7..1d069cd 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -16,7 +16,7 @@ pub use self::{ use image::DynamicImage; use itertools::Itertools; -use reqwest::{Client, StatusCode, Url}; +use reqwest::{blocking::Client, StatusCode, Url}; use serde::{de::DeserializeOwned, Serialize}; use std::{error::Error, fmt, path::Path}; @@ -72,7 +72,7 @@ where fn ensure_found(self) -> Result; } -impl ApiResponse for reqwest::Response { +impl ApiResponse for reqwest::blocking::Response { fn ensure_found(self) -> Result { if self.status() == StatusCode::PARTIAL_CONTENT || self.status() == StatusCode::NOT_FOUND { Err(ApiError::ItemNotFound) diff --git a/src/main.rs b/src/main.rs index d8e66a1..98dbc1e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,18 +1,3 @@ -extern crate base64; -extern crate byteorder; -extern crate clap; -extern crate image; -extern crate imageproc; -extern crate itertools; -extern crate md5; -extern crate num_enum; -extern crate num_traits; -extern crate reqwest; -extern crate rusttype; -extern crate termcolor; -extern crate toml; -extern crate xdg; - use std::error::Error as StdError; use std::fmt; -- cgit v1.2.3