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

implement App::data as App::app_data(Data::new(T))) #1906

Merged
merged 4 commits into from
Jan 15, 2021
Merged

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Jan 15, 2021

PR Type

Refactor / Fix

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt
  • (Team) Label with affected crates and semver status.

Overview

Removes some code in AppService that has been redundant since the introduction of layered data containers.

Implements App::data in the logical way.

Fixes bug where multiple calls to App::data would not retain the latest call's data, unlike App::app_data. A test was added for it.

Adds some docs to ServiceConfig.

@robjtede robjtede changed the title implement App::data as App::app_data(Data::new(T))) implement App::data as App::app_data(Data::new(T))) Jan 15, 2021
@robjtede robjtede added A-web project: actix-web B-semver-major breaking change requiring a major version bump labels Jan 15, 2021
@robjtede robjtede requested review from a team January 15, 2021 05:12
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.

LGTM

src/data.rs Show resolved Hide resolved
@robjtede robjtede merged commit da69bb4 into master Jan 15, 2021
@robjtede robjtede deleted the data-order branch January 15, 2021 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-web project: actix-web B-semver-major breaking change requiring a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants