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

Rename serve to run, add asynchronous serve #203

Merged
merged 2 commits into from
May 15, 2019

Conversation

tirr-c
Copy link
Collaborator

@tirr-c tirr-c commented May 7, 2019

Description

  • Rename original serve to run.
  • Add App::serve that returns a Future.

Motivation and Context

This provides flexibility when composing app server with other futures. (cc #163)

How Has This Been Tested?

No new tests, existing tests pass.

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.

@tirr-c tirr-c requested a review from yoshuawuyts May 7, 2019 14:31
@fairingrey
Copy link
Contributor

fairingrey commented May 14, 2019

LGTM! Will likely have to be rebased after #219 lands, but shouldn't take long.

Also resolved the merge conflict (accepted the incoming changes), since serve now, ahem, serves a different purpose.

EDIT: Ah, right, you'll also have to use the new .await syntax.

src/app.rs Outdated Show resolved Hide resolved
Copy link
Member

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

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

💯

@tirr-c
Copy link
Collaborator Author

tirr-c commented May 15, 2019

Rebased and review applied!

@fairingrey fairingrey merged commit 77dd922 into http-rs:master May 15, 2019
@tirr-c tirr-c deleted the serve-future branch May 15, 2019 06:55
yoshuawuyts added a commit that referenced this pull request Nov 3, 2019
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
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.

3 participants