mirror of https://github.com/grpc/grpc-node.git
grpc-js-core: remove use of return await
return await isn't typically useful in async functions.
This commit is contained in:
parent
b7b45e6dd7
commit
4ae503abee
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue