Update to futures-preview 0.3.0-alpha.11 and rustc 1.33.0-nightly

Change-Id: Ib81d6a5720cc596a08d91a875c3b32fd1b9ad93a
diff --git a/Cargo.toml b/Cargo.toml
index 280e4cf..46d4900 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,8 +25,7 @@
 chrono = { version = "0.4", features = [ "serde" ] }
 data-encoding = "2.0.0-rc.2"
 derp = "0.0.11"
-futures_01 = { version = "0.1", package = "futures" }
-futures-preview = { version = "0.3.0-alpha.10", features = [ "compat" ] }
+futures-preview = { version = "0.3.0-alpha.11", features = [ "compat" ] }
 http = "0.1"
 hyper = { version = "0.12", default-features = false }
 itoa = "0.4"
diff --git a/src/client.rs b/src/client.rs
index f306552..aa7fc2f 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -3,7 +3,7 @@
 //! # Example
 //!
 //! ```no_run
-//! #![feature(async_await, await_macro, futures_api, pin)]
+//! #![feature(async_await, await_macro, futures_api)]
 //! # use futures::executor::block_on;
 //! # use hyper::client::Client as HttpClient;
 //! # use std::path::PathBuf;
@@ -62,7 +62,7 @@
 };
 use crate::repository::Repository;
 use crate::tuf::Tuf;
-use crate::Result;
+use crate::{Result, TufFuture};
 
 /// Translates real paths (where a file is stored) into virtual paths (how it is addressed in TUF)
 /// and back.
@@ -567,13 +567,13 @@
                         .get(delegation.role())
                         .unwrap()
                         .clone();
-                    let (term, res) = await!(Box::pinned(self.lookup_target_description(
+                    let (term, res) = await!(Box::pin(self.lookup_target_description(
                         delegation.terminating(),
                         current_depth + 1,
                         target,
                         snapshot,
                         Some(meta.as_ref()),
-                    )));
+                    )) as TufFuture<(bool, Result<TargetDescription>)>);
 
                     if term && res.is_err() {
                         return (true, res);
diff --git a/src/lib.rs b/src/lib.rs
index 3eb3ac0..2d0585b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -109,7 +109,7 @@
     clippy::op_ref,
     clippy::too_many_arguments
 )]
-#![feature(async_await, await_macro, futures_api, pin)]
+#![feature(async_await, await_macro, futures_api)]
 
 pub mod client;
 pub mod crypto;
diff --git a/src/repository.rs b/src/repository.rs
index 50f1923..93d5c0b 100644
--- a/src/repository.rs
+++ b/src/repository.rs
@@ -132,7 +132,7 @@
     where
         M: Metadata + 'static,
     {
-        Box::pinned(
+        Box::pin(
             async move {
                 Self::check::<M>(meta_path)?;
 
@@ -163,7 +163,7 @@
     where
         M: Metadata + 'static,
     {
-        Box::pinned(
+        Box::pin(
             async move {
                 Self::check::<M>(&meta_path)?;
 
@@ -193,7 +193,7 @@
     where
         R: AsyncRead + 'a,
     {
-        Box::pinned(
+        Box::pin(
             async move {
                 let mut path = self.local_path.join("targets");
                 path.extend(target_path.components());
@@ -216,7 +216,7 @@
         target_path: &'a TargetPath,
         target_description: &'a TargetDescription,
     ) -> TufFuture<'a, Result<Box<dyn AsyncRead>>> {
-        Box::pinned(
+        Box::pin(
             async move {
                 let mut path = self.local_path.join("targets");
                 path.extend(target_path.components());
@@ -406,7 +406,7 @@
     where
         M: Metadata + 'static,
     {
-        Box::pinned(
+        Box::pin(
             async {
                 Err(Error::Opaque(
                     "Http repo store metadata not implemented".to_string(),
@@ -425,7 +425,7 @@
     where
         M: Metadata + 'static,
     {
-        Box::pinned(
+        Box::pin(
             async move {
                 Self::check::<M>(meta_path)?;
 
@@ -457,7 +457,7 @@
     where
         R: AsyncRead + 'a,
     {
-        Box::pinned(async { Err(Error::Opaque("Http repo store not implemented".to_string())) })
+        Box::pin(async { Err(Error::Opaque("Http repo store not implemented".to_string())) })
     }
 
     fn fetch_target<'a>(
@@ -465,7 +465,7 @@
         target_path: &'a TargetPath,
         target_description: &'a TargetDescription,
     ) -> TufFuture<'a, Result<Box<dyn AsyncRead>>> {
-        Box::pinned(
+        Box::pin(
             async move {
                 let (alg, value) = crypto::hash_preference(target_description.hashes())?;
                 let components = target_path.components();
@@ -537,7 +537,7 @@
     where
         M: Metadata + 'static,
     {
-        Box::pinned(
+        Box::pin(
             async move {
                 Self::check::<M>(meta_path)?;
                 let mut buf = Vec::new();
@@ -559,7 +559,7 @@
     where
         M: Metadata + 'static,
     {
-        Box::pinned(
+        Box::pin(
             async move {
                 Self::check::<M>(meta_path)?;
 
@@ -592,7 +592,7 @@
     where
         R: AsyncRead + 'a,
     {
-        Box::pinned(
+        Box::pin(
             async move {
                 println!("EphemeralRepository.store_target: {:?}", target_path);
                 let mut buf = Vec::new();
@@ -609,7 +609,7 @@
         target_path: &'a TargetPath,
         target_description: &'a TargetDescription,
     ) -> TufFuture<'a, Result<Box<dyn AsyncRead>>> {
-        Box::pinned(
+        Box::pin(
             async move {
                 let targets = self.targets.read().unwrap();
                 match targets.get(target_path) {
diff --git a/tests/simple_example.rs b/tests/simple_example.rs
index 2961e46..3a43b4c 100644
--- a/tests/simple_example.rs
+++ b/tests/simple_example.rs
@@ -1,4 +1,4 @@
-#![feature(async_await, await_macro, futures_api, pin)]
+#![feature(async_await, await_macro, futures_api)]
 
 extern crate chrono;
 extern crate futures;