alacritty / vte

Parser for virtual terminal emulators
https://docs.rs/vte/
Apache License 2.0
242 stars 56 forks source link

Add trivial derives to `utf8parser::Parser` #83

Closed epage closed 1 year ago

epage commented 1 year ago

I am using this to validate output sent to std::io::Write::write but the entire validated output might not be written. To workaround this, I need to snapshot my validation state, attempt the write, and then replay my validation up-to what was written. This requires the data to be cloneable to do so but Parser isn't.

Much like std::ops::Range, we likely don't want this to be Copy as that makes it too easy to get mixed up on what state you are using but Clone should be explicit enough to be safe.

In addition to Clone, I've also added Debug, PartialEq, and Eq

epage commented 1 year ago

Done

chrisduerr commented 1 year ago

If you need a release for this, please let me know. Considering the slow pace of VTE, this will likely take a while before being released naturally.

epage commented 1 year ago

If you could do a release, I'd appreciate it.

Maybe I'm biased but I've found cargo release to make releases so trivial that I am able to do them on every user-facing PR for my crates.