8000 Update to warp's rejection system 0.2.0-alpha breaks ructe · Issue #63 · kaj/ructe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update to warp's rejection system 0.2.0-alpha breaks ructe #63

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

Closed
nocduro opened this issue Nov 20, 2019 · 1 comment
Closed

Update to warp's rejection system 0.2.0-alpha breaks ructe #63

nocduro opened this issue Nov 20, 2019 · 1 comment

Comments

@nocduro
Copy link
nocduro commented Nov 20, 2019

Hi! The 0.2.0-alpha version of warp (currently unreleased) breaks ructe compilation with the warp feature enabled. Warp has changed the rejection system to require that custom rejections implement the Reject trait. Since io::Error and http::Error don't implement this trait I made a wrapper around them that you can look at here:

https://github.com/nocduro/ructe/commit/863490e4669aa07ecb766c1b5eb91f5faf7bc66e

I didn't make a pull request because I'm not sure if this is the best way to fix this. Do these function ever error? Are the errors ever consumed by the warp app somewhere? Maybe a unit struct could be used as the error to save passing around the new error enum.

And then for transitioning, maybe another feature for warp0.2? I'm not sure how this kind of stuff is usually handled.

Thanks for the great library!

@kaj
Copy link
Owner
kaj commented Nov 20, 2019

Hi! Thanks for the heads-up. The warp feature of ructe was probably added prematurely, but yes, adding a separate warp02 feature would probably be a good way forward. I haven't looked at warp 0.20-alpha yet, but I look forward to trying it out.

@nocduro nocduro closed this as completed Nov 22, 2019
kaj added a commit that referenced this issue Jan 25, 2020
* PR #70, Issue #63: Add feature warp02, supportig warp 0.2.x, and add
  a name alias warp01 for the old warp 0.1.x feature.  Same in
  examples.
* PR #69, Issue #67: Anyting that is allowed in a string in Rust
  should be allowed in a string in ructe.
* Fix clippy complaints re statics in generated code.
* Update actix-web example to 2.0.
* Fix doctest with mime03 feature.

Thanks to @nocduro and @Aunmag for suggestions and bug reports.
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

No branches or pull requests

2 participants
0