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

also try extracting payload config as Data<T> #1610

Merged
merged 1 commit into from Jul 20, 2020
Merged

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Jul 19, 2020

PR Type

Ergonomics Improvement

PR Checklist

Check your PR fulfills the following:

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.

Overview

When setting payload config it seems to make sense to check Data too to allow for programmer error (for lack of better phrase) in using App::data instead of App::app_data to set config, especially since a mis-configuration currently does not result in an error message (because default fallback config is used).

Follow-up Work

Apply same change to Json and Form extractors.

@robjtede robjtede marked this pull request as ready for review July 19, 2020 03:27
@robjtede robjtede requested review from a team July 19, 2020 03:27
@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2020

Codecov Report

Merging #1610 into master will increase coverage by 0.16%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1610      +/-   ##
==========================================
+ Coverage   52.89%   53.06%   +0.16%     
==========================================
  Files         124      124              
  Lines       11771    11807      +36     
==========================================
+ Hits         6226     6265      +39     
+ Misses       5545     5542       -3     
Impacted Files Coverage Δ
src/types/payload.rs 86.47% <100.00%> (+5.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 971ba3e...deea39b. Read the comment docs.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Sounds good idea, lgtm.

@robjtede robjtede merged commit 43c3627 into master Jul 20, 2020
@robjtede robjtede deleted the data-extract-loc branch July 20, 2020 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants