@@ -1,6 +1,6 @@ | |||||
[package] | [package] | ||||
name = "gutenberg" | name = "gutenberg" | ||||
version = "0.4.2" | |||||
version = "0.5.0" | |||||
authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] | authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] | ||||
license = "MIT" | license = "MIT" | ||||
readme = "README.md" | readme = "README.md" | ||||
@@ -7,4 +7,4 @@ authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] | |||||
error-chain = "0.12" | error-chain = "0.12" | ||||
tera = "0.11" | tera = "0.11" | ||||
toml = "0.4" | toml = "0.4" | ||||
image = "0.19.0" | |||||
image = "0.20" |
@@ -7,7 +7,7 @@ authors = ["Vojtěch Král <vojtech@kral.hk>"] | |||||
lazy_static = "1" | lazy_static = "1" | ||||
regex = "1.0" | regex = "1.0" | ||||
tera = "0.11" | tera = "0.11" | ||||
image = "0.19" | |||||
image = "0.20" | |||||
rayon = "1" | rayon = "1" | ||||
errors = { path = "../errors" } | errors = { path = "../errors" } | ||||
@@ -15,7 +15,7 @@ use std::collections::hash_map::DefaultHasher; | |||||
use std::fs::{self, File}; | use std::fs::{self, File}; | ||||
use regex::Regex; | use regex::Regex; | ||||
use image::{GenericImage, FilterType}; | |||||
use image::{FilterType, GenericImageView}; | |||||
use image::jpeg::JPEGEncoder; | use image::jpeg::JPEGEncoder; | ||||
use rayon::prelude::*; | use rayon::prelude::*; | ||||
@@ -4,5 +4,5 @@ version = "0.1.0" | |||||
authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] | authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"] | ||||
[dependencies] | [dependencies] | ||||
reqwest = "0.8" | |||||
reqwest = "0.9" | |||||
lazy_static = "1" | lazy_static = "1" |
@@ -2,8 +2,8 @@ extern crate reqwest; | |||||
#[macro_use] | #[macro_use] | ||||
extern crate lazy_static; | extern crate lazy_static; | ||||
use reqwest::header::{qitem, Accept, Headers}; | |||||
use reqwest::{mime, StatusCode}; | |||||
use reqwest::header::{HeaderMap, ACCEPT}; | |||||
use reqwest::{StatusCode}; | |||||
use std::collections::HashMap; | use std::collections::HashMap; | ||||
use std::error::Error; | use std::error::Error; | ||||
use std::sync::{Arc, RwLock}; | use std::sync::{Arc, RwLock}; | ||||
@@ -54,8 +54,8 @@ pub fn check_url(url: &str) -> LinkResult { | |||||
} | } | ||||
} | } | ||||
let mut headers = Headers::new(); | |||||
headers.set(Accept(vec![qitem(mime::TEXT_HTML), qitem(mime::STAR_STAR)])); | |||||
let mut headers = HeaderMap::new(); | |||||
headers.insert(ACCEPT, "text/html, *".parse().unwrap()); | |||||
let client = reqwest::Client::new(); | let client = reqwest::Client::new(); | ||||