Skip to content

bump futures-preview and remove some "extern crates" #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dist: trusty
language: rust
cache: cargo
rust:
- nightly-2019-01-09
- nightly

env:
global:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ path = "./src/lib.rs"
chrono = { version = "0.4", features = [ "serde" ] }
data-encoding = "2.0.0-rc.2"
derp = "0.0.11"
futures-preview = { version = "0.3.0-alpha.11", features = [ "compat" ] }
futures-preview = { version = "0.3.0-alpha.12", features = [ "compat" ] }
http = "0.1"
hyper = { version = "0.12", default-features = false }
itoa = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ environment:
matrix:
# Rust - Nightly
- TARGET: i686-pc-windows-gnu
RUST_VERSION: nightly-2019-01-09
RUST_VERSION: nightly
BITS: 32
MSYS2: 1
- TARGET: x86_64-pc-windows-msvc
RUST_VERSION: nightly-2019-01-09
RUST_VERSION: nightly
BITS: 64

install:
Expand Down
93 changes: 0 additions & 93 deletions src/into_async_read.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ pub mod metadata;
pub mod repository;
pub mod tuf;

mod into_async_read;
mod shims;
mod util;

Expand Down
5 changes: 2 additions & 3 deletions src/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use tempfile::{self, NamedTempFile};
use crate::crypto::{self, HashAlgorithm, HashValue};
use crate::error::Error;
use crate::interchange::DataInterchange;
use crate::into_async_read::IntoAsyncRead;
use crate::metadata::{
Metadata, MetadataPath, MetadataVersion, SignedMetadata, TargetDescription, TargetPath,
};
Expand Down Expand Up @@ -438,7 +437,7 @@ where
.map_err(|err| io::Error::new(io::ErrorKind::Other, err));

let mut reader = SafeReader::new(
IntoAsyncRead::new(stream),
stream.into_async_read(),
max_size.unwrap_or(::std::usize::MAX) as u64,
self.min_bytes_per_second,
hash_data,
Expand Down Expand Up @@ -477,7 +476,7 @@ where
.map_err(|err| io::Error::new(io::ErrorKind::Other, err));

let reader = SafeReader::new(
IntoAsyncRead::new(stream),
stream.into_async_read(),
target_description.size(),
self.min_bytes_per_second,
Some((alg, value.clone())),
Expand Down
5 changes: 1 addition & 4 deletions tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#[macro_use]
extern crate maplit;
extern crate tuf;

use maplit::hashset;
use tuf::crypto::{HashAlgorithm, PrivateKey, SignatureScheme};
use tuf::interchange::Json;
use tuf::metadata::{
Expand Down
4 changes: 0 additions & 4 deletions tests/simple_example.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#![feature(async_await, await_macro, futures_api)]

extern crate chrono;
extern crate futures;
extern crate tuf;

use futures::executor::block_on;
use tuf::client::{Client, Config, PathTranslator};
use tuf::crypto::{HashAlgorithm, KeyId, PrivateKey, SignatureScheme};
Expand Down