Dead code

This commit is contained in:
Aleksey Kladov 2019-12-30 20:16:57 +01:00
parent 6cc55e4c5c
commit b8368f09b4
2 changed files with 2 additions and 18 deletions

View File

@ -1,16 +0,0 @@
export class LineBuffer {
private outBuffer: string = '';
public processOutput(chunk: string, cb: (line: string) => void) {
this.outBuffer += chunk;
let eolIndex = this.outBuffer.indexOf('\n');
while (eolIndex >= 0) {
// line includes the EOL
const line = this.outBuffer.slice(0, eolIndex + 1);
cb(line);
this.outBuffer = this.outBuffer.slice(eolIndex + 1);
eolIndex = this.outBuffer.indexOf('\n');
}
}
}

View File

@ -28,11 +28,11 @@ export class StatusDisplay implements vscode.Disposable {
if (this.packageName) { if (this.packageName) {
this.statusBarItem!.text = `cargo ${this.command} [${ this.statusBarItem!.text = `cargo ${this.command} [${
this.packageName this.packageName
}] ${this.frame()}`; }] ${this.frame()}`;
} else { } else {
this.statusBarItem!.text = `cargo ${ this.statusBarItem!.text = `cargo ${
this.command this.command
} ${this.frame()}`; } ${this.frame()}`;
} }
}, 300); }, 300);