zhiburt / tabled

An easy to use library for pretty print tables of Rust structs and enums.
MIT License
2.03k stars 84 forks source link

Add a way to build common table while build with `ansi` feature on #451

Open zhiburt opened 4 hours ago

zhiburt commented 4 hours ago

Just a thought a had promptly.

Sometimes we are in control of data and we know there's no ansi in content while in some cases there is.

We could have some flag to use a general version of algorithms for such case. As they are considered superior from performance point of view.

Even though the benchmarks show a minor if no difference at all in general case. But there are places for example like wrapping which haven't been benched to be candor.

Currently it's only possible by turning the ansi feature off. Which is no go in such case.


It would probably require a literal flag inside a Table. Which would be quite annoying.... Maybe there would be better design idea.

zhiburt commented 4 hours ago

ref: https://github.com/nushell/nushell/pull/14377 https://github.com/nushell/nushell/issues/6855