-
Notifications
You must be signed in to change notification settings - Fork 145
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
Tide support #280
Tide support #280
Conversation
This introduces support for Tide by implementing `From` over markup. Unlike other frameworks, Tide does not seem to provide e.g. a trait which could instead be implemented. However as demonstrated, this alternative results in a simple, ergonomic interface. Consumers may leverage Tide support by using the "tide" feature.
Thanks for looking at this, @lambda-fairy--I think the doctest build should be passing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @maxcountryman!
Can you please add an entry to the changelog as well?
Other than the minor nits, LGTM.
mod tide_support { | ||
use crate::PreEscaped; | ||
use alloc::{format, string::String}; | ||
use tide::{http::mime, Response, StatusCode}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No action needed here, but it would be nice to standardize on an import style at some point.
Filed #281 for this.
doctest/Cargo.toml
Outdated
@@ -7,11 +7,13 @@ edition = "2018" | |||
[dependencies] | |||
actix-web = "3" | |||
ammonia = "3" | |||
async-std = {version = "1.9.0", features = ["attributes"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add spaces
async-std = {version = "1.9.0", features = ["attributes"]} | |
async-std = { version = "1.9.0", features = ["attributes"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've instead broken this out; there's a consideration for consistency, but I'll leave that up to you to decide if that's something you want to apply more generally.
a90aa24
to
1a81fea
Compare
1a81fea
to
cffd9b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
This introduces support for Tide by implementing
From
over markup.Unlike other frameworks, Tide does not seem to provide e.g. a trait
which could instead be implemented. However as demonstrated, this
alternative results in a simple, ergonomic interface.
Consumers may leverage Tide support by using the "tide" feature.