Closed jly36963 closed 3 years ago
Hi @jly36963. I'm sorry to hear that this is confusing you but actually this is intentional. Example code on the master branch uses the master branch version of gotham. The master branch might contain breaking changes that will appear in the next release (keeping semantic versioning in mind of course). If you want example code for the latest release, use the example code at the time of release:
https://github.com/gotham-rs/gotham/tree/gotham-0.6.0/examples/query_string/introduction
This could probably do with better documentation, which is tracked in #400 already.
Perfect, thank you
Issue
I believe the query string example works for
but doesn't work for
Environment
rustup 1.24.3 (ce5817a94 2021-05-31) rustc 1.57.0-nightly (308dffd25 2021-09-22) cargo 1.57.0-nightly (9a28ac83c 2021-09-18)
Code
I started learning rust a few weeks ago, and I'm trying to learn Gotham. I have example code here
I commented out the route handler and struct that use the query string because the linter/compiler had a lot of issues with those code blocks.
When I run the code without those blocks commented out, the linter & compiler complain about my usage of
StateData
,StaticResponseExtender
,take::from
, andwith_query_string_extractor
.(Side note: I had to import StaticResponseExtender with
use gotham::router::response::extender::StaticResponseExtender;
which differs from the example)Am I messing something up?