Open remi-dupre opened 9 months ago
Can you avoid let .. else
in order to pass the MSRV tests?
Indeed, that should be good now :+1:
And format is also a recent-is feature, on it :grimacing:
I'll try to build on 1.56, it didn't work last time I tried it because it fails to resolve regex = "=1.10.3"
:disappointed:
EDIT : Ok, got it
Should be good, make test
runs with rust 1.56 on my machine :+1:
Hi!
While working on a bug of
indicatif
(cf. https://github.com/console-rs/indicatif/pull/627), I needed an ANSI-aware slicing method. I think it made more sense to add it in this crate.I made this quite similar to
truncate_str
, which enables code reuse :blush:I also suggested a non-allocating implementation for
measure_text_width
:shrug: