mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
debt - avoid deprecated Buffer ctors
This commit is contained in:
@@ -239,7 +239,7 @@ export async function grep(filename: string, pattern: RegExp): Promise<boolean>
|
||||
export function readBytes(stream: Readable, bytes: number): Promise<Buffer> {
|
||||
return new Promise<Buffer>((complete, error) => {
|
||||
let done = false;
|
||||
let buffer = new Buffer(bytes);
|
||||
let buffer = Buffer.allocUnsafe(bytes);
|
||||
let bytesRead = 0;
|
||||
|
||||
stream.on('data', (data: Buffer) => {
|
||||
|
||||
Reference in New Issue
Block a user