rustasync / runtime

Empowering everyone to build asynchronous software
https://docs.rs/runtime
Apache License 2.0
862 stars 28 forks source link

migrate to .await syntax #28

Closed marcelbuesing closed 5 years ago

marcelbuesing commented 5 years ago

Migrate from await! to .await

Description

This migrates the project to the new .await syntax. Basically the replace-await tool did all the work here.

The only exception is the examples/tcp-proxy.rs seems like it's not possible to remove the feature flag yet in the example:

error[E0658]: `await!(<expr>)` macro syntax is unstable, and will soon be removed in favor of `<expr>.await` syntax.
  --> examples/tcp-proxy.rs:30:13
   |
30 |             try_join!(a, b)?;
   |             ^^^^^^^^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/50547
   = help: add #![feature(await_macro)] to the crate attributes to enable
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Motivation and Context

Ran into the following error in my project that I had migrated to .await syntax, workaround for now is to just add the await_macro feature in my crate again.

error[E0658]: `await!(<expr>)` macro syntax is unstable, and will soon be removed in favor of `<expr>.await` syntax.
 --> proj/examples/get.rs:7:1
  |
7 | #[runtime::main]
  | ^^^^^^^^^^^^^^^^
  |
  = note: for more information, see https://github.com/rust-lang/rust/issues/50547
  = help: add #![feature(await_macro)] to the crate attributes to enable

Types of changes

marcelbuesing commented 5 years ago

Sorry just noticed this is a duplicate of #26

yoshuawuyts commented 5 years ago

@marcelbuesing thanks heaps for the PR tho!