-
Notifications
You must be signed in to change notification settings - Fork 25
Description
When looking at the source code, I came to realize that there are some functions that seem to be unnecessarily marked as being async.
The debug function in file dcc.js for example has the following implementation
export async function debug(uri) {
return await decodeCbor(await unpack(uri));
}So it is probably being marked as async because it uses and awaits the functions decodeCbor and unpack, which are both marked as being async.
But it seems to me that these two functions don't need to be async either; there is no await statement in the unpack function, and the only await statements in decodeCbor are when the decodeCbor function itself is being called recursively, so async/await should be unnecessary here as well.
I haven't looked at the rest of the code, so there might be more functions that are ultimately unnecessarily marked as being async.