mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-12 18:55:47 -07:00
making search work (finally)
This commit is contained in:
@@ -65,7 +65,9 @@ impl<W: io::Write> Printer<W> {
|
||||
self.write(b":");
|
||||
}
|
||||
self.write(&buf[start..end]);
|
||||
self.write(b"\n");
|
||||
if buf[start..end].last() != Some(&b'\n') {
|
||||
self.write(b"\n");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn context<P: AsRef<Path>>(
|
||||
@@ -83,11 +85,13 @@ impl<W: io::Write> Printer<W> {
|
||||
self.write(b"-");
|
||||
}
|
||||
self.write(&buf[start..end]);
|
||||
self.write(b"\n");
|
||||
if buf[start..end].last() != Some(&b'\n') {
|
||||
self.write(b"\n");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn binary_matched<P: AsRef<Path>>(&mut self, path: P) {
|
||||
wln!(&mut self.wtr, "binary file {} matches", path.as_ref().display());
|
||||
wln!(&mut self.wtr, "Binary file {} matches", path.as_ref().display());
|
||||
}
|
||||
|
||||
fn write(&mut self, buf: &[u8]) {
|
||||
|
Reference in New Issue
Block a user