update most deps, notably including reqwest

Fixes #60

The reqwest dependency is significant because the old version required
an old version of openssl, complicating compilation on newer platforms.
reqwest also pulled in old/duplicate versions of hyper, tokio, etc.
Nice to drop a lot of that cruft.

I left rusqlite and uuid alone because they had breaking changes I
didn't want to mess with at the moment.

Bumped the minimum Rust version to 1.30.0, as required by the
new encoding_rs crate (and perhaps other things).
This commit is contained in:
Scott Lamb
2018-11-20 09:32:55 -08:00
parent aa81eae65a
commit 071be03c6f
7 changed files with 616 additions and 615 deletions

View File

@@ -1456,7 +1456,7 @@ impl FileInner {
let start = s.s.sample_file_range().start + r.start;
let mmap = Box::new(unsafe {
memmap::MmapOptions::new()
.offset(start as usize)
.offset(start)
.len((r.end - r.start) as usize)
.map(&f)?
});
@@ -2204,6 +2204,7 @@ mod bench {
use db::testutil::{self, TestDb};
use futures::{Future, future};
use hyper;
use http::header;
use http_serve;
use self::test::Bencher;
use std::error::Error as StdError;
@@ -2298,10 +2299,9 @@ mod bench {
b.bytes = p;
let client = reqwest::Client::new();
let mut run = || {
use self::reqwest::header::{Range, ByteRangeSpec};
let mut resp =
client.get(server.url.clone())
.header(Range::Bytes(vec![ByteRangeSpec::FromTo(0, p - 1)]))
.header(header::RANGE, format!("bytes=0-{}", p - 1))
.send()
.unwrap();
buf.clear();

View File

@@ -621,7 +621,7 @@ mod bench {
let client = reqwest::Client::new();
let mut f = || {
let mut resp = client.get(url.clone()).send().unwrap();
assert_eq!(resp.status(), reqwest::StatusCode::Ok);
assert_eq!(resp.status(), reqwest::StatusCode::OK);
buf.clear();
use std::io::Read;
resp.read_to_end(&mut buf).unwrap();