diff options
author | Ed Page <eopage@gmail.com> | 2023-03-08 10:53:10 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 16:53:10 +0000 |
commit | 8b415320df73b54808ae06d0bf22adcb7dc706ee (patch) | |
tree | 5ed3c2dc151303ab1eca51933190e452d542e856 /utf8parse/src/lib.rs | |
parent | dc861b1dae166183c66848fcbd47b8e81a43d972 (diff) | |
download | r-alacritty-vte-8b415320df73b54808ae06d0bf22adcb7dc706ee.tar.gz r-alacritty-vte-8b415320df73b54808ae06d0bf22adcb7dc706ee.tar.bz2 r-alacritty-vte-8b415320df73b54808ae06d0bf22adcb7dc706ee.zip |
Add trivial derives to `utf8parser::Parser`
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.
`PartialOrd` / `Ord` were left off because there isn't really a
user-facing ordering to these types
`Hash` was left off as the use cases for it isn't clear.
Diffstat (limited to 'utf8parse/src/lib.rs')
-rw-r--r-- | utf8parse/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8parse/src/lib.rs b/utf8parse/src/lib.rs index 947a0aa..093de81 100644 --- a/utf8parse/src/lib.rs +++ b/utf8parse/src/lib.rs @@ -25,7 +25,7 @@ pub trait Receiver { /// A parser for Utf8 Characters /// /// Repeatedly call `advance` with bytes to emit Utf8 characters -#[derive(Default)] +#[derive(Clone, Default, PartialEq, Eq, Debug)] pub struct Parser { point: u32, state: State, |