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

Tide support #280

Merged
merged 9 commits into from
Aug 6, 2021
Merged

Conversation

maxcountryman
Copy link
Contributor

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.

maxcountryman and others added 6 commits July 31, 2021 14:22
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.
@maxcountryman
Copy link
Contributor Author

Thanks for looking at this, @lambda-fairy--I think the doctest build should be passing now.

Copy link
Owner

@lambda-fairy lambda-fairy left a 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.

maud/src/lib.rs Outdated Show resolved Hide resolved
mod tide_support {
use crate::PreEscaped;
use alloc::{format, string::String};
use tide::{http::mime, Response, StatusCode};
Copy link
Owner

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.

@@ -7,11 +7,13 @@ edition = "2018"
[dependencies]
actix-web = "3"
ammonia = "3"
async-std = {version = "1.9.0", features = ["attributes"]}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add spaces

Suggested change
async-std = {version = "1.9.0", features = ["attributes"]}
async-std = { version = "1.9.0", features = ["attributes"] }

Copy link
Contributor Author

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.

@lambda-fairy lambda-fairy changed the title provide tide support Tide support Aug 4, 2021
Copy link
Owner

@lambda-fairy lambda-fairy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@lambda-fairy lambda-fairy merged commit ba9c7b5 into lambda-fairy:master Aug 6, 2021
@maxcountryman maxcountryman deleted the feature/tide branch August 6, 2021 12:27
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