v0.2.5-pre.010.fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-logging-lib/src/writer.rs
|
||||
// version: 4
|
||||
// version: 5
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
enum StripAnsiState {
|
||||
@@ -12,12 +12,14 @@ enum StripAnsiState {
|
||||
StringEscape,
|
||||
}
|
||||
|
||||
/// Crate-internal `StripAnsiWriter` state shared across the owning crate.
|
||||
pub(crate) struct StripAnsiWriter<W> {
|
||||
inner: W,
|
||||
state: StripAnsiState,
|
||||
}
|
||||
|
||||
impl<W> StripAnsiWriter<W> {
|
||||
/// Creates a new `StripAnsiWriter` value.
|
||||
pub(crate) const fn new(inner: W) -> Self {
|
||||
return Self { inner, state: StripAnsiState::Text };
|
||||
}
|
||||
@@ -100,6 +102,7 @@ impl<W> StripAnsiWriter<W> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Crate-internal `RouteMakeWriter` state shared across the owning crate.
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct RouteMakeWriter<W> {
|
||||
inner: W,
|
||||
@@ -107,11 +110,13 @@ pub(crate) struct RouteMakeWriter<W> {
|
||||
}
|
||||
|
||||
impl<W> RouteMakeWriter<W> {
|
||||
/// Creates a new `RouteMakeWriter` value.
|
||||
pub(crate) fn new(inner: W, filter: crate::OutputFilter) -> Self {
|
||||
return Self { inner, filter };
|
||||
}
|
||||
}
|
||||
|
||||
/// Crate-internal `RoutedWriter` variants used by the owning crate.
|
||||
pub(crate) enum RoutedWriter<W> {
|
||||
Enabled(W),
|
||||
Disabled,
|
||||
|
||||
Reference in New Issue
Block a user