printer: move PathPrinter into grep-printer

I originally did not put PathPrinter into grep-printer because I
considered it somewhat extraneous to what a "grep" program does, and
also that its implementation was rather simple. But now with hyperlink
support, its implementation has grown a smidge more complicated. And
more importantly, its existence required exposing a lot more of the
hyperlink guts. Without it, we can keep things like HyperlinkPath and
HyperlinkSpan completely private.

We can now also keep `PrinterPath` completely private as well. And this
is a breaking change.
This commit is contained in:
Andrew Gallant
2023-09-21 17:28:58 -04:00
parent 09905560ff
commit 23e21133ba
9 changed files with 222 additions and 159 deletions

View File

@@ -65,13 +65,12 @@ assert_eq!(output, expected);
pub use crate::{
color::{default_color_specs, ColorError, ColorSpecs, UserColorSpec},
hyperlink::{
HyperlinkPath, HyperlinkPattern, HyperlinkPatternBuilder,
HyperlinkPatternError, HyperlinkSpan, HyperlinkValues,
HyperlinkPattern, HyperlinkPatternBuilder, HyperlinkPatternError,
},
path::{PathPrinter, PathPrinterBuilder},
standard::{Standard, StandardBuilder, StandardSink},
stats::Stats,
summary::{Summary, SummaryBuilder, SummaryKind, SummarySink},
util::PrinterPath,
};
#[cfg(feature = "serde")]
@@ -99,6 +98,7 @@ mod hyperlink_aliases;
mod json;
#[cfg(feature = "serde")]
mod jsont;
mod path;
mod standard;
mod stats;
mod summary;