grpc-js-core: remove use of return await

return await isn't typically useful in async functions.
This commit is contained in:
cjihrig 2018-09-10 17:44:31 -04:00
parent b7b45e6dd7
commit 4ae503abee
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
2 changed files with 6 additions and 6 deletions

View File

@ -185,7 +185,7 @@ export class CompressionFilter extends BaseFilter implements Filter {
* compressed, and the output message is deframed and uncompressed. So * compressed, and the output message is deframed and uncompressed. So
* this is another reason that this filter should be at the bottom of the * this is another reason that this filter should be at the bottom of the
* filter stack. */ * filter stack. */
return await this.receiveCompression.readMessage(await message); return this.receiveCompression.readMessage(await message);
} }
} }

View File

@ -19,23 +19,23 @@ export interface Filter {
export abstract class BaseFilter { export abstract class BaseFilter {
async sendMetadata(metadata: Promise<Metadata>): Promise<Metadata> { async sendMetadata(metadata: Promise<Metadata>): Promise<Metadata> {
return await metadata; return metadata;
} }
async receiveMetadata(metadata: Promise<Metadata>): Promise<Metadata> { async receiveMetadata(metadata: Promise<Metadata>): Promise<Metadata> {
return await metadata; return metadata;
} }
async sendMessage(message: Promise<WriteObject>): Promise<WriteObject> { async sendMessage(message: Promise<WriteObject>): Promise<WriteObject> {
return await message; return message;
} }
async receiveMessage(message: Promise<Buffer>): Promise<Buffer> { async receiveMessage(message: Promise<Buffer>): Promise<Buffer> {
return await message; return message;
} }
async receiveTrailers(status: Promise<StatusObject>): Promise<StatusObject> { async receiveTrailers(status: Promise<StatusObject>): Promise<StatusObject> {
return await status; return status;
} }
} }