Skip to content

Commit

Permalink
Remove redundant println! lines
Browse files Browse the repository at this point in the history
  • Loading branch information
uttarayan21 committed Sep 26, 2021
1 parent c159a29 commit c108aea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
9 changes: 0 additions & 9 deletions src/ansi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,12 @@ pub fn ansi_to_text<'t, B: IntoIterator<Item = u8>>(bytes: B) -> Result<Text<'t>

for byte in reader {
// let byte_char = char::from(byte);
// println!("{:#?}", byte);

if ansi_stack.is_unlocked() && last_byte == b'\x1b' && byte != b'[' {
// if byte after \x1b was not [ lock the stack
ansi_stack.lock();
}

// if byte == 66 {
// println!("{:?}", style_stack.last());
// println!("{:?}", style);
// }

// println!("{:?}",style_stack.last());
if ansi_stack.is_locked() && byte != b'\n' && byte != b'\x1b' {
if line_styled_buffer.is_empty()
&& !line_buffer.is_empty()
Expand Down Expand Up @@ -136,11 +129,9 @@ pub fn ansi_to_text<'t, B: IntoIterator<Item = u8>>(bytes: B) -> Result<Text<'t>
style = style.patch(_style_new);
}

// println!("_x {:#?}", _x);
if style_stack.is_empty() {
style_stack.push(style);
}
// println!("After {:#?}", style_stack);
// lock after parse since lock will clear
ansi_stack.lock();
}
Expand Down
1 change: 0 additions & 1 deletion src/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ impl AnsiGraphicsStack {
// but since you can actually write more than u8 (incase of erroneous input)
// i'm using usize
// if input is greater than u8 simply skip the iteration and clear the color_stack.
println!("sequence {:?}", sequence);

let code;
let _seq: Result<u8, _> = sequence.try_into();
Expand Down

0 comments on commit c108aea

Please sign in to comment.