diff --git a/src/ascii/char.rs b/src/ascii/char.rs index 03e7bcd..ac8018a 100644 --- a/src/ascii/char.rs +++ b/src/ascii/char.rs @@ -1,19 +1,9 @@ +#[derive(Clone, Copy)] pub enum AsciiChar { NOT_ASCII, ASCII(u8), } -impl Clone for AsciiChar { - fn clone(&self) -> Self { - match self { - AsciiChar::NOT_ASCII => return AsciiChar::NOT_ASCII, - AsciiChar::ASCII(c) => return AsciiChar::ASCII(*c), - } - } -} - -impl Copy for AsciiChar {} - impl PartialEq for AsciiChar { fn eq(&self, other: &Self) -> bool { match self { @@ -52,6 +42,11 @@ impl PartialEq for AsciiChar { } } +#[test] +fn _ascii_char_size() { + println!("{}", std::mem::size_of::()); +} + impl PartialEq for char { fn eq(&self, other: &AsciiChar) -> bool { match other {