Git Product home page Git Product logo

session's People

Contributors

flosse avatar ryman avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

session's Issues

Update nickel dependency version

According to the src folder in .cargo/registry, [email protected] is dependent on [email protected] which is dependent on [email protected]. Therefore, trying to cargo check a project that relies on it will give the following error message :

error: enum is private and its variants cannot be re-exported
  --> <cargo registry path>\mustache-0.6.3\src\parser.rs:4:9
   |
4  | pub use self::ParserState::*;
   |         ^^^^^^^^^^^^^^^^^^^^
...
43 | enum ParserState { TEXT, OTAG, TAG, CTAG }
   | ---------------- help: consider making the enum public: `pub enum ParserState`

error: enum is private and its variants cannot be re-exported
  --> <cargo registry path>\mustache-0.6.3\src\parser.rs:5:9
   |
5  | pub use self::TokenClass::*;
   |         ^^^^^^^^^^^^^^^^^^^
...
18 | enum TokenClass {
   | --------------- help: consider making the enum public: `pub enum TokenClass`

   Compiling gdi32-sys v0.2.0
error: aborting due to 2 previous errors

error: Could not compile `mustache`.

Modifying the dependency to [email protected] should do the trick.

Information on my setup:

#rustc --version --verbose
rustc 1.32.0-nightly (4a45578bc 2018-12-07)
binary: rustc
commit-hash: 4a45578bc58ff262864f72680cc02e83f5d2f5b3
commit-date: 2018-12-07
host: x86_64-pc-windows-msvc
release: 1.32.0-nightly
LLVM version: 8.0

#cargo --version --verbose
cargo 1.32.0-nightly (5e85ba14a 2018-12-02)
release: 1.32.0
commit-hash: 5e85ba14aaa20f8133863373404cb0af69eeef2c
commit-date: 2018-12-02

Runtime error on windows

even on this code

    server.get("/", middleware! { |req, mut res|
        format!("You are logged in as: {:?}\n", CookieSession::get_mut(req, &mut res))
    });

capture

can't build example with nickel.rs 0.9

    router.get("/", middleware! { |req, mut response|
      let mut data = HashMap::new();
      let cook = format!("{:?}", CookieSession::get_mut(req, &mut response));
error[E0308]: mismatched types
  --> src/handler.rs:24:57
   |
24 |       let cook = format!("{:?}", CookieSession::get_mut(req, &mut response));
   |                                                         ^^^ expected struct `nickel::request::Request`, found struct `nickel::Request`
   |
   = note: expected type `&mut nickel::request::Request<'_, '_, _>`
   = note:    found type `&'r mut nickel::Request<'mw, 'conn, _>`

error[E0308]: mismatched types
  --> src/handler.rs:24:62
   |
24 |       let cook = format!("{:?}", CookieSession::get_mut(req, &mut response));
   |                                                              ^^^^^^^^^^^^^ expected struct `nickel::response::Response`, found struct `nickel::Response`
   |
   = note: expected type `&mut nickel::response::Response<'_, _>`
   = note:    found type `&mut nickel::Response<'mw, _>`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.