Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest master Rocket version #89

Merged
merged 7 commits into from
Apr 26, 2021

Conversation

thanadolps
Copy link
Contributor

Because of some change in rocket's master branch, currently this library cannot be use with rocket's master branch. This PR update the library to be compatible with latest rocket's master branch.

Changes

  • Rocket phase have changed to Build -> Ignite -> Orbit
    • rocket::ignite()(which was previously the first phase) are now replaced by rocket::build()
    • rocket::Rocket now have one type parameter signifying the phase
  • Replace fairing's on_attach() with on_ignite()
    • some of fairing's test are change to test when rocket are on ignite phase.
  • Replace rocket::handler with rocket::route
    • rocket::route::Handler don't have the same lifetime signature as (now removed)rocket::handler::Handler
  • rocket::log_ are removed
  • Replace rocket::Request::get_param() with rocket::Request::param()
  • Multiple segment now matched empty path (previously the route "/<p..>" won't match "/" but now it will). this change cause the routes returned from catch_all_options_routes() to collide so I remove the empty route.

- rocket::handler -> rocket::route
- request.get_param() -> request.param
- Change attach -> ignite and ignite -> build
- Update lifetime signature of FromRequest
In rocket 0.5 "/<catch_all_options_route..>" should match path "/" too hence the collision.
@lawliet89
Copy link
Owner

Could you update Cargo.toml to lock it to a specific commit instead? Less likely to break.

@thanadolps
Copy link
Contributor Author

Done

@lawliet89 lawliet89 merged commit c0d7b36 into lawliet89:master Apr 26, 2021
@lawliet89
Copy link
Owner

Thanks for your contribution!

j03-dev added a commit to j03-dev/rocket_cors that referenced this pull request Nov 2, 2023
lawliet89 added a commit that referenced this pull request Nov 17, 2023
* Update to latest master Rocket version (#89)

* Fix "useless `vec!`"

* Fix docs

---------

Co-authored-by: Yong Wen Chua <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants