Skip to content

Commit e4fcb6c

Browse files
authored
Merge pull request #279 from realcr/master
Workaround for issue #278: works around Rust internal compiler error.
2 parents 994ee1c + 4bc805b commit e4fcb6c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: rust
2-
rust: nightly-2019-05-09
2+
rust: nightly-2019-06-02
33
cache: cargo
44

55
before_script:

tide-cookies/src/middleware.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ impl<State: Send + Sync + 'static> Middleware<State> for CookiesMiddleware {
4444

4545
let cookie_jar = cookie_data.content.clone();
4646

47-
cx.extensions_mut().insert(cookie_data);
47+
// The `let _ = ...` is a workaround for issue: https://github.com/rustasync/tide/issues/278
48+
// Solution is according to suggestion in https://github.com/rust-lang/rust/issues/61579#issuecomment-500436524
49+
let _ = cx.extensions_mut().insert(cookie_data);
4850
let mut res = next.run(cx).await;
4951
let headers = res.headers_mut();
5052
for cookie in cookie_jar.read().unwrap().delta() {

0 commit comments

Comments
 (0)