cutenode / good-first-issue

🖥 CLI for finding good first issues
736 stars 123 forks source link

refactor: remove unnecessary async keyword #126

Closed codebytere closed 5 years ago

codebytere commented 5 years ago

From docs, if no await is present in a function the execution is not paused and code will then be executed synchronously.

search itself returns a promise, and so all the async keyword would do in this case would be to make the function automatically return an (extra) Promise that's resolved when the function returns. There would thus have been two promises needing resolution, which wouldn't have changed end-user behavior since if you await nested promises, it will keep awaiting until everything resolves.

This just removes that extra async.

cc @bnb