File tree 3 files changed +37
-19
lines changed 3 files changed +37
-19
lines changed Original file line number Diff line number Diff line change 1
1
language : rust
2
- rust :
3
- - nightly-2019-05-09
4
-
5
- before_script : |
6
- rustup component add rustfmt clippy
7
- script : |
8
- cargo fmt --all -- --check &&
9
- cargo clippy --all --all-features -- -D clippy::all &&
10
- cargo build --no-default-features --verbose &&
11
- cargo build --all --all-features --verbose &&
12
- cargo test --all --all-features --verbose
2
+ rust : nightly-2019-05-09
13
3
cache : cargo
4
+
5
+ matrix :
6
+ include :
7
+ - name : cargo doc
8
+ env : [CACHE_NAME=docs]
9
+ script :
10
+ - RUSTDOCFLAGS=-Dwarnings
11
+ cargo doc --all --all-features --no-deps --exclude tide
12
+
13
+ - name : cargo fmt
14
+ cache : false
15
+ before_script : rustup component add rustfmt
16
+ script : cargo fmt --all -- --check
17
+
18
+ - name : cargo clippy
19
+ env : [CACHE_NAME=clippy]
20
+ before_script : rustup component add clippy
21
+ script : cargo clippy --all --all-targets --exclude examples -- -Dwarnings
22
+
23
+ - name : cargo build --no-default-features
24
+ env : [CACHE_NAME=no-default-features]
25
+ script :
26
+ - cargo build --manifest-path tide/Cargo.toml --no-default-features
27
+ - cargo build --manifest-path tide-core/Cargo.toml --no-default-features
28
+
29
+ - name : cargo test
30
+ script : cargo test --all --verbose
Original file line number Diff line number Diff line change @@ -289,8 +289,7 @@ mod tests {
289
289
. header ( ACCEPT_ENCODING , hval)
290
290
. body ( Body :: empty ( ) )
291
291
. unwrap ( ) ;
292
- let res = server. simulate ( req) . unwrap ( ) ;
293
- res
292
+ server. simulate ( req) . unwrap ( )
294
293
}
295
294
296
295
// Generates a decoded response given a request body and the header value representing its encoding.
@@ -301,8 +300,7 @@ mod tests {
301
300
. header ( CONTENT_ENCODING , hval)
302
301
. body ( body)
303
302
. unwrap ( ) ;
304
- let res = server. simulate ( req) . unwrap ( ) ;
305
- res
303
+ server. simulate ( req) . unwrap ( )
306
304
}
307
305
308
306
#[ test]
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use tide_core::{
9
9
10
10
/// Middleware to work with cookies.
11
11
///
12
- /// [`CookiesMiddleware`] along with [`ContextExt`](crate::cookies ::ContextExt) provide smooth
12
+ /// [`CookiesMiddleware`] along with [`ContextExt`](crate::data ::ContextExt) provide smooth
13
13
/// access to request cookies and setting/removing cookies from response. This leverages the
14
14
/// [cookie](https://crates.io/crates/cookie) crate.
15
15
/// This middleware parses cookies from request and caches them in the extension. Once the request
@@ -74,7 +74,11 @@ mod tests {
74
74
75
75
/// Tide will use the the `Cookies`'s `Extract` implementation to build this parameter.
76
76
async fn retrieve_cookie ( mut cx : Context < ( ) > ) -> String {
77
- format ! ( "{}" , cx. get_cookie( COOKIE_NAME ) . unwrap( ) . unwrap( ) . value( ) )
77
+ cx. get_cookie ( COOKIE_NAME )
78
+ . unwrap ( )
79
+ . unwrap ( )
80
+ . value ( )
81
+ . to_string ( )
78
82
}
79
83
80
84
async fn set_cookie ( mut cx : Context < ( ) > ) {
@@ -109,8 +113,7 @@ mod tests {
109
113
. header ( http:: header:: COOKIE , "testCookie=RequestCookieValue" )
110
114
. body ( Body :: empty ( ) )
111
115
. unwrap ( ) ;
112
- let res = server. simulate ( req) . unwrap ( ) ;
113
- res
116
+ server. simulate ( req) . unwrap ( )
114
117
}
115
118
116
119
#[ test]
You can’t perform that action at this time.
0 commit comments