LukeMathWalker / zero-to-production

Code for "Zero To Production In Rust", a book on API development using Rust.
https://www.zero2prod.com
Apache License 2.0
5.43k stars 470 forks source link

Chapter 7.3.8.1 : Unnecessary async modifier #222

Open 9SMTM6 opened 9 months ago

9SMTM6 commented 9 months ago

The build function in that chapter has an async modifier, but doesnt use await. This also caused compilation issues for me, but that might just be me, removing the modifier solved them without issue.

juanmaia commented 2 months ago

Same for me, if you remove the async you need to also remove the await from the calls in main and test/api/helpers

so

let application = Application::build(configuration).await?; 
// should become
let application = Application::build(configuration)?;