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.
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 theasync
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 youawait
nested promises, it will keepawait
ing until everything resolves.This just removes that extra
async
.cc @bnb