diff options
Diffstat (limited to 'extensions/git/src/util.ts')
-rw-r--r-- | extensions/git/src/util.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/git/src/util.ts b/extensions/git/src/util.ts index b568080bf48..53ab6c9e310 100644 --- a/extensions/git/src/util.ts +++ b/extensions/git/src/util.ts @@ -89,7 +89,7 @@ export function eventToPromise<T>(event: Event<T>): Promise<T> { } export function once(fn: (...args: any[]) => any): (...args: any[]) => any { - let didRun = false; + const didRun = false; return (...args) => { if (didRun) { @@ -219,11 +219,11 @@ 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 = Buffer.allocUnsafe(bytes); + const buffer = Buffer.allocUnsafe(bytes); let bytesRead = 0; stream.on('data', (data: Buffer) => { - let bytesToRead = Math.min(bytes - bytesRead, data.length); + const bytesToRead = Math.min(bytes - bytesRead, data.length); data.copy(buffer, bytesRead, 0, bytesToRead); bytesRead += bytesToRead; |