mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Dead code
This commit is contained in:
parent
6cc55e4c5c
commit
b8368f09b4
@ -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');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user