kaj/ructe

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

Closed this issue · 1 comments

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 commented

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.