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

big clean up and docs improvmenet of types mod #1894

Merged
merged 4 commits into from
Jan 9, 2021
Merged

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Jan 9, 2021

PR Type

Refactor (Mostly)

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.
  • Format code with the latest stable rustfmt

Overview

Vastly better docs and code quality on all structs in types mod. Couple improvements made along the way.

@robjtede robjtede marked this pull request as ready for review January 9, 2021 11:16
@robjtede robjtede merged commit 6575ee9 into master Jan 9, 2021
@robjtede robjtede deleted the cleanup-types branch January 9, 2021 13:17
abonander added a commit to abonander/actix-web that referenced this pull request Apr 13, 2021
Upgrading to the beta and this seems to have changed from `3.3.5` but no reason is given in actix#1894 for the change so I presume it was a mistake. The content field of `Json` is still `pub` which supports this conclusion.

I recently switched from calling `.into_inner()` to destructuring in the function arguments and it's a lot nicer, especially for singular path arguments such as:

```rust
#[get("/user/{id}")]
async fn get_user(Path(user_id): Path<Uuid>) -> Option<User> {
    // ...
}
```
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.

None yet

1 participant