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

Add doc example showing query parameter extraction #291

Merged
merged 1 commit into from Jul 18, 2019

Conversation

@phansch
Copy link
Contributor

commented Jul 18, 2019

Description

This adds a doc test that shows how to parse the URL query into a HashMap.

Motivation and Context

I found this not very well documented and hope the docs will save some time.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
@phansch

This comment has been minimized.

Copy link
Contributor Author

commented Jul 18, 2019

Thinking a bit more about this, I believe my main problem was initially that ContextExt/querystring were not easily discoverable in the docs; This PR doesn't really address that.

Would you be fine with also adding this example to the docs in App?

@secretfader

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2019

Thanks for including an example. I wrote this crate as Tide was just beginning to stabilize, with the goal of coming back and adding doctests later.

As you noticed, that never happened!

I agree that it's reasonable to include a link to this example in docs for App, but I'm unsure about how to best proceed, since I'm not an expert on rustdoc.

As is, this PR already adds significant value. Maybe we open an issue on the topic of docs and interlinking? I'm willing to bet we have a bunch of cases similar to this one, across the Tide ecosystem.

@phansch

This comment has been minimized.

Copy link
Contributor Author

commented Jul 18, 2019

Maybe we open an issue on the topic of docs and interlinking?

Sounds like the best approach to me 👍

@secretfader secretfader merged commit f269183 into rustasync:master Jul 18, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@secretfader

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2019

Cool. I'll go ahead and merge this PR. Thanks for your help! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.