Skip to content

Commit 03783ac

Browse files
committed
remove duplicate and unused deps
1 parent 9b57306 commit 03783ac

File tree

15 files changed

+317
-321
lines changed

15 files changed

+317
-321
lines changed

Cargo.toml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ unstable = []
3030

3131
[dependencies]
3232
async-sse = "2.1.0"
33+
cookie = { version = "0.12.0", features = ["percent-encode"]}
3334
http-types = "1.0.1"
3435
async-h1 = { version = "1.1.2", optional = true }
3536
route-recognizer = "0.1.13"
@@ -38,29 +39,14 @@ serde_json = "1.0.41"
3839
serde_qs = "0.5.0"
3940
async-std = { version = "1.4.0", features = ["unstable"] }
4041
mime = "0.3.14"
41-
cookie = { version = "0.12.0", features = ["percent-encode"]}
42-
futures-core = "0.3.1"
43-
futures = { version = "0.3.1", optional = true }
44-
http = { version = "0.2.0", optional = true }
45-
tokio = { version = "0.2.13", optional = true }
46-
url = "2.1.1"
4742
kv-log-macro = "1.0.4"
4843
mime_guess = "2.0.3"
4944

5045
[dev-dependencies]
5146
async-std = { version = "1.4.0", features = ["unstable", "attributes"] }
52-
basic-cookies = "0.1.3"
53-
bytes = "0.4.12"
54-
futures-fs = "0.0.5"
55-
futures-util = { version = "0.3.0", features = ["compat"] }
5647
juniper = "0.14.1"
57-
mime = "0.3.14"
58-
mime_guess = "2.0.1"
59-
percent-encoding = "2.1.0"
6048
serde = { version = "1.0.102", features = ["derive"] }
61-
structopt = "0.3.3"
6249
surf = "2.0.0-alpha.1"
63-
futures = "0.3.1"
6450
femme = "1.3.0"
6551
portpicker = "0.1.0"
6652

src/cookies/middleware.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use crate::response::CookieEvent;
22
use crate::utils::BoxFuture;
33
use crate::{Middleware, Next, Request};
44

5-
use cookie::{Cookie, CookieJar};
6-
use http_types::headers;
5+
use crate::http::cookies::{Cookie, CookieJar};
6+
use crate::http::headers;
77

88
use std::sync::{Arc, RwLock};
99

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
//!
2626
//! __hello world__
2727
//! ```no_run
28-
//! # use futures::executor::block_on;
28+
//! # use async_std::task::block_on;
2929
//! # fn main() -> Result<(), std::io::Error> { block_on(async {
3030
//! #
3131
//! let mut app = tide::new();
@@ -37,7 +37,7 @@
3737
//!
3838
//! __echo server__
3939
//! ```no_run
40-
//! # use futures::executor::block_on;
40+
//! # use async_std::task::block_on;
4141
//! # fn main() -> Result<(), std::io::Error> { block_on(async {
4242
//! #
4343
//! let mut app = tide::new();
@@ -49,7 +49,7 @@
4949
//!
5050
//! __send and receive json__
5151
//! ```no_run
52-
//! # use futures::executor::block_on;
52+
//! # use async_std::task::block_on;
5353
//! # fn main() -> Result<(), std::io::Error> { block_on(async {
5454
//! # use tide::{Request, Response};
5555
//! #
@@ -217,7 +217,7 @@ pub use http_types::{self as http, Body, Error, Status, StatusCode};
217217
/// # Examples
218218
///
219219
/// ```no_run
220-
/// # use futures::executor::block_on;
220+
/// # use async_std::task::block_on;
221221
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
222222
/// #
223223
/// let mut app = tide::new();
@@ -237,7 +237,7 @@ pub fn new() -> server::Server<()> {
237237
/// # Examples
238238
///
239239
/// ```no_run
240-
/// # use futures::executor::block_on;
240+
/// # use async_std::task::block_on;
241241
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
242242
/// #
243243
/// use tide::Request;

src/redirect/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! # Examples
44
//!
55
//! ```no_run
6-
//! # use futures::executor::block_on;
6+
//! # use async_std::task::block_on;
77
//! # fn main() -> Result<(), std::io::Error> { block_on(async {
88
//! #
99
//! use tide::redirect;

src/redirect/permanent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{Endpoint, Request, Response};
88
///
99
/// # Examples
1010
/// ```no_run
11-
/// # use futures::executor::block_on;
11+
/// # use async_std::task::block_on;
1212
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
1313
/// #
1414
/// use tide::redirect;

src/redirect/temporary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{Endpoint, Request, Response};
88
///
99
/// # Examples
1010
/// ```no_run
11-
/// # use futures::executor::block_on;
11+
/// # use async_std::task::block_on;
1212
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
1313
/// #
1414
/// use tide::redirect;

src/request.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use cookie::Cookie;
21
use route_recognizer::Params;
32
use serde::Deserialize;
43

@@ -8,7 +7,7 @@ use async_std::task::{Context, Poll};
87
use std::pin::Pin;
98
use std::{str::FromStr, sync::Arc};
109

11-
use crate::cookies::CookieData;
10+
use crate::cookies::{Cookie, CookieData};
1211
use crate::http::headers::{HeaderName, HeaderValue};
1312
use crate::http::{self, Method, StatusCode, Url, Version};
1413
use crate::Response;
@@ -45,7 +44,7 @@ impl<State> Request<State> {
4544
/// # Examples
4645
///
4746
/// ```no_run
48-
/// # use futures::executor::block_on;
47+
/// # use async_std::task::block_on;
4948
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
5049
/// #
5150
/// use tide::Request;
@@ -68,7 +67,7 @@ impl<State> Request<State> {
6867
/// # Examples
6968
///
7069
/// ```no_run
71-
/// # use futures::executor::block_on;
70+
/// # use async_std::task::block_on;
7271
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
7372
/// #
7473
/// use tide::Request;
@@ -91,7 +90,7 @@ impl<State> Request<State> {
9190
/// # Examples
9291
///
9392
/// ```no_run
94-
/// # use futures::executor::block_on;
93+
/// # use async_std::task::block_on;
9594
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
9695
/// #
9796
/// use tide::Request;
@@ -114,7 +113,7 @@ impl<State> Request<State> {
114113
/// # Examples
115114
///
116115
/// ```no_run
117-
/// # use futures::executor::block_on;
116+
/// # use async_std::task::block_on;
118117
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
119118
/// #
120119
/// use tide::Request;
@@ -196,7 +195,7 @@ impl<State> Request<State> {
196195
/// # Examples
197196
///
198197
/// ```no_run
199-
/// # use futures::executor::block_on;
198+
/// # use async_std::task::block_on;
200199
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
201200
/// #
202201
/// use tide::Request;
@@ -231,7 +230,7 @@ impl<State> Request<State> {
231230
/// # Examples
232231
///
233232
/// ```no_run
234-
/// # use futures::executor::block_on;
233+
/// # use async_std::task::block_on;
235234
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
236235
/// #
237236
/// use tide::Request;

src/response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use async_std::io::prelude::*;
22
use std::convert::TryFrom;
33

4-
use cookie::Cookie;
54
use mime::Mime;
65
use serde::Serialize;
76

7+
use crate::http::cookies::Cookie;
88
use crate::http::headers::{HeaderName, HeaderValue};
99
use crate::http::{self, Body, StatusCode};
1010

src/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl Server<()> {
141141
/// # Examples
142142
///
143143
/// ```no_run
144-
/// # use futures::executor::block_on;
144+
/// # use async_std::task::block_on;
145145
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
146146
/// #
147147
/// let mut app = tide::new();
@@ -169,7 +169,7 @@ impl<State: Send + Sync + 'static> Server<State> {
169169
/// # Examples
170170
///
171171
/// ```no_run
172-
/// # use futures::executor::block_on;
172+
/// # use async_std::task::block_on;
173173
/// # fn main() -> Result<(), std::io::Error> { block_on(async {
174174
/// #
175175
/// use tide::Request;

tests/cookies.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use cookie::Cookie;
2-
use futures::executor::block_on;
3-
use futures::AsyncReadExt;
1+
use tide::http::cookies::Cookie;
2+
use async_std::task::block_on;
3+
use async_std::prelude::*;
44

55
use tide::{Request, Response, Server, StatusCode};
66

0 commit comments

Comments
 (0)