Commit Graph

1501 Commits

Author SHA1 Message Date
Sergio Benitez 9f0e02fe27 Make references to core types absolute in codegen.
Prior to this commit, codegen emitted tokens containing bare types like
'Result' and 'Box' as well as presumed imported variants such as 'None'
and 'Ok'.  However, users are free to shadow these, and if they do, the
generated code will fail to compile, or worse, be incorrect. To avoid
this, this commit makes all references to these core types and imports
absolute.
2020-02-06 21:16:45 -08:00
Sergio Benitez d0bfd8a3bb Update 'cookie' to 0.13.2. 2020-01-29 14:17:01 -08:00
Sergio Benitez f8e72d2e2e Add prerelease flag to 'config.sh'. 2020-01-29 14:16:50 -08:00
Sergio Benitez f35e3c4aca Set cookies even on error responses.
Fixes #1213.
2020-01-23 21:10:04 -08:00
Jeb Rosen 1ae3e68087 Fix Windows CI by forcing 64-bit rustup installation. 2020-01-21 18:07:10 -08:00
Sergio Benitez 7c1b8dc9ad Update 'cookie' to 0.13, 'rustls' to 0.16. 2020-01-21 16:10:04 -08:00
Jeb Rosen 31712018bb Update versions and links for updated dependencies. 2020-01-20 14:51:00 -08:00
Jeb Rosen 4151cd46db Remove [target.'cfg(debug_assertions)'.dependencies] in contrib Cargo.toml.
This is not supported and is the same as putting the contents in
[dependencies] anyway. It became a warning in rust-lang/cargo#7660.
2020-01-19 12:45:08 -08:00
Razican f4bb8bb511 Update depedencies:
* contrib: 'rmp-serde', 'tera', 'memcache', 'mysql', 'postgres', 'redis'.
* examples: 'parking-lot', 'rand'
2020-01-19 11:01:11 -08:00
Jeb Rosen ff2000293c Update 'compiletest' and fix and re-enable compile UI tests. 2020-01-15 17:09:57 -08:00
A. L 859224a209 Add additional Responder wrappers for some common HTTP status codes:
* 204 NoContent
* 401 Unauthorized
* 403 Forbidden
* 409 Conflict
2020-01-15 11:41:19 -08:00
Jeb Rosen 2d8bdd457e Fix CI on MacOS.
Homebrew/homebrew-core#46566 merged 'mysql-connector-c' into
'mysql-client', which does not install into the same paths.
2019-12-01 12:11:18 -08:00
Paolo Barbolini cd5f96ae15 Update 'uuid', 'unicode-xid', and 'base64' dependencies. 2019-11-30 09:33:14 -08:00
Michael Howell 121210c55c Add support for base16-encoded (a.k.a. hex-encoded) secret keys. 2019-11-29 12:06:55 -08:00
Jeb Rosen 96235615ce Update compile tests for changes in rust nightly. 2019-11-29 11:18:32 -08:00
Jeb Rosen 343f51d550 Disable UI tests for now. 2019-11-29 11:18:26 -08:00
Jeb Rosen e04bceb81e Call iter() instead of into_iter() on arrays (rust-lang/rust#66145). 2019-11-28 12:41:26 -08:00
Jeb Rosen 22442313a7 Extend 'Engines' example to illustrate its proper use. 2019-11-16 13:15:47 -08:00
Jeb Rosen 9c5d0912ec Explain how to resolve the One-At-A-Time Cookies problem when using FlashMessage.
Fixes #1090.
2019-11-16 13:15:47 -08:00
Jeb Rosen d98e938e1a Point out that the database attribute must be imported.
Fixes #1074.
2019-11-16 13:15:47 -08:00
Jeb Rosen 14ee05b9a1 Change 'cookies' to 'mut cookies' in the guide, as required to call 'get_private'.
Fixes #1095.
2019-11-16 13:15:44 -08:00
Jeb Rosen e7e84a6d41 Fix and update benchmarks. 2019-11-16 13:08:36 -08:00
Matt Brubeck 8bf6aa2068 Update 'smallvec' to '1.0'. 2019-11-16 13:02:50 -08:00
adrian5 3a1f012b56 Fix typo in databases documentation: extraneous word 'database'. 2019-11-03 10:06:45 -08:00
Jacob Pratt 4e6a7ddd5f Remove use of the 'crate_visibility_modifier' feature.
Most items with 'crate' visibility become 'pub(crate)'.
Items are made 'pub' instead when they would remain private.
2019-09-21 09:16:04 -07:00
Jeb Rosen 335d8f7dbb Adjust '#[catch]' codegen output to fix a UI test regression in latest nightly. 2019-09-21 08:33:16 -07:00
Sergio Benitez 777d01fa87 Remove unused features in contrib codegen. 2019-09-18 19:34:03 -07:00
Jacob Pratt bed93133b8 Abide by formatting in 'Debug' implementations. 2019-09-18 19:06:08 -07:00
Jacob Pratt e3c1a4ad3a Remove use of the 'try_trait' feature.
Add the 'try_outcome' macro to replace uses of '?' on 'Outcome'.
2019-09-18 18:43:16 -07:00
Jacob Pratt b95b6765e1 Remove use of 'label_break_value' feature. 2019-09-10 17:27:40 -07:00
Sergio Benitez 2537a1164d Remove 'Result' specialization. Add 'Debug' responder.
This removes all uses of specialization in Rocket.
2019-09-09 21:57:33 -07:00
Sergio Benitez 592e441de5 Use proper span in responder codegen output. 2019-09-09 21:57:10 -07:00
Sergio Benitez 3fae9919f7 Deprecate 'Result<T, E>, E: !Responder' responder. 2019-09-09 21:56:55 -07:00
Sergio Benitez 22da02fa64 Remove double semicolons; silence test warnings. 2019-09-09 16:57:03 -07:00
Sergio Benitez b7e688cefa Remove use of deprecated 'IndexMap::remove()'.
Use 'IndexMap::swap_remove()' in its place.
2019-09-09 16:51:51 -07:00
Sergio Benitez 99a864008c Remove use of specialization in http. 2019-09-09 16:45:03 -07:00
Sergio Benitez 6ed4c098f1 Stop exporting 'mime' and relevant conversions. 2019-09-09 16:42:44 -07:00
Sergio Benitez c5973f01df Remove use of specialization in 'status::Created'. 2019-09-09 16:37:46 -07:00
Christian Bourjau ed6661abaa Fix typo in README: missing 'a'. 2019-09-07 09:53:37 -07:00
Sergio Benitez 0b059e06e5 Update 'devise' to 0.3.
This transitively updates 'syn', 'proc-macro2', and 'quote' to 1.0.
2019-09-05 15:44:25 -07:00
Sergio Benitez dcea9563fc Update UI tests for latest nightly. 2019-08-26 12:48:32 -07:00
Pieter Frenssen 1383671090 Do not display 'Error:' on a successful logout in the 'session' example. 2019-08-12 17:39:52 -07:00
Jacob Pratt 2dd09f90be Remove unused 'doc_cfg' feature. 2019-08-06 14:01:35 -07:00
Sergio Benitez b8ab9e5b23 Add template engine versions to docs. 2019-07-19 13:35:29 -07:00
Ning Sun 93c979eb43 Update 'handlebars' to 2.0. 2019-07-19 13:34:38 -07:00
Jeb Rosen 3e4f8453ce Remove use of the 'decl_macro' feature.
Also removes one internal use in the 'typed-uris' codegen test.
2019-07-19 11:39:56 -07:00
Jeb Rosen 2f458b5217 Remove dependence on 'decl_macro' in codegen.
The generated 'uri' helper macros are now re-exports of 'macro_rules'
macros, made possible by the stable 'uniform_paths' feature.
2019-07-19 11:38:35 -07:00
Jacob Pratt 34a741a26e Remove use of '!' type in favor of 'Infallible'.
This removes the use of and dependence on the 'never_type' feature.
2019-07-09 15:10:51 -07:00
Sergio Benitez 21b10176ee Forward from 'StaticFiles' if a file is not found.
Also adds a 'handler::Outcome::from_or_forward' method for easily
constructing handler outcomes that forward on responder failures.

Fixes #1036.
2019-07-07 23:22:38 -07:00
Dmitry Murzin c100a92127 Implement 'FromParam' for 'NonZero*' types. 2019-07-06 13:32:08 -07:00