Skip to content

Commit

Permalink
Merge pull request #279 from realcr/master
Browse files Browse the repository at this point in the history
Workaround for issue #278: works around Rust internal compiler error.
  • Loading branch information
tirr-c authored Jun 24, 2019
2 parents 994ee1c + 4bc805b commit e4fcb6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: rust
rust: nightly-2019-05-09
rust: nightly-2019-06-02
cache: cargo

before_script:
Expand Down
4 changes: 3 additions & 1 deletion tide-cookies/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ impl<State: Send + Sync + 'static> Middleware<State> for CookiesMiddleware {

let cookie_jar = cookie_data.content.clone();

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

0 comments on commit e4fcb6c

Please sign in to comment.