From d99b850b6ce9a7dca08cbcb9c7da2030044972bd Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 27 Sep 2023 16:59:41 -0500 Subject: [PATCH 1/2] fix(stream)!: Restrict StripStream to raw streams --- crates/anstream/src/strip.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/anstream/src/strip.rs b/crates/anstream/src/strip.rs index 48bbd340..3b464445 100644 --- a/crates/anstream/src/strip.rs +++ b/crates/anstream/src/strip.rs @@ -4,7 +4,10 @@ use crate::RawStream; /// Only pass printable data to the inner `Write` #[derive(Debug)] -pub struct StripStream { +pub struct StripStream +where + S: RawStream, +{ raw: S, state: StripBytes, } From 1be8e1d96052c0ddd5eca3364854e8b7f362390f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 27 Sep 2023 16:59:51 -0500 Subject: [PATCH 2/2] refactor(stream): Align strip/wincon --- crates/anstream/src/wincon.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/anstream/src/wincon.rs b/crates/anstream/src/wincon.rs index 3049966b..b9be2257 100644 --- a/crates/anstream/src/wincon.rs +++ b/crates/anstream/src/wincon.rs @@ -25,7 +25,7 @@ where pub fn new(raw: S) -> Self { Self { raw, - state: Box::default(), + state: Default::default(), } }