ascii-canvas
ascii-canvas copied to clipboard
Migrate to Anstyle
This is a first pass at moving away from term. It compiles but I haven't actually looked too much into what styling happens.
One nice thing is that now many of the bounds are now based on the standard library like std::io::{Write, Result} instead of Terminal + ?Sized or term::Result.
The way styles are applied is a little different, but all of the colors and most of the styles are basically the same. Note Standout which i think is equivalent to anstyle::Effects::BOLD | anstyle::Effects::INVERT but not 100% clear on that.
This crate has very few tests which makes these kinds of updates a little risky imo though I don't think the diff is too big that we can't go through it thoroughly and maybe add some insta snapshot testing.
@lalrpop/maintainers Looking for a review and also noting that I don't seem to have write access despite being a lalrpop member... that's fine but hopefully someone active does for when this is good to go.
Will close #4 and a pre-req for https://github.com/lalrpop/lalrpop/issues/856
@Pat-Lafon you (and other @lalrpop/maintainers) should now have write access, sorry about that
This would help our project if it were merged. Is this blocked?
At least from my perspective, I'm hoping @Pat-Lafon will answer my questions here before I do another review pass.
I agree with your desire to get this merged.
The original set of tests don't take into account style/color. I've poked at this enough so that I can write some expect-tests for the current behavior when it comes to styling. I want to use that to understand where things might be currently going awry.