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

match HttpRequest app_data behavior in ServiceRequest #1618

Merged
merged 2 commits into from
Aug 9, 2020

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Jul 21, 2020

PR Type

Fix

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

Changes ServiceRequest::app_data to match HttpRequest::app_data's return type since it doesn't make much sense to have different return types given you can just split a ServiceRequest and get at the HttpRequest anyway.

closes #1613

@robjtede robjtede added the B-semver-major breaking change requiring a major version bump label Jul 21, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2020

Codecov Report

Merging #1618 into master will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1618      +/-   ##
==========================================
+ Coverage   53.07%   53.15%   +0.07%     
==========================================
  Files         126      126              
  Lines       11757    11770      +13     
==========================================
+ Hits         6240     6256      +16     
+ Misses       5517     5514       -3     
Impacted Files Coverage Δ
src/service.rs 79.62% <100.00%> (+3.15%) ⬆️
actix-http/src/header/common/accept.rs 0.00% <0.00%> (ø)
actix-http/src/header/common/etag.rs
...ctix-http/src/header/common/if_unmodified_since.rs
actix-http/src/header/common/if_modified_since.rs 0.00% <0.00%> (ø)
actix-http/src/header/common/accept_language.rs 0.00% <0.00%> (ø)

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 46627be...a6f0922. Read the comment docs.

@robjtede robjtede force-pushed the fix/service-data-lookup branch from c08ca83 to 894f305 Compare August 8, 2020 01:30
@robjtede robjtede marked this pull request as ready for review August 8, 2020 01:32
@robjtede robjtede requested review from a team August 8, 2020 01:32
@robjtede robjtede changed the title WIP: match HttpRequest app_data behavior in ServiceRequest match HttpRequest app_data behavior in ServiceRequest Aug 8, 2020
Copy link
Contributor

@fakeshadow fakeshadow left a comment

Choose a reason for hiding this comment

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

I like this change. It also fully enabled custom data types where it can be extracted both in handler and requests.

@robjtede robjtede merged commit 187646b into master Aug 9, 2020
@robjtede robjtede deleted the fix/service-data-lookup branch August 9, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-semver-major breaking change requiring a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ServiceRequest::app_data only allows extracting Data<T> types
3 participants