diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-05-27 01:06:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-26 23:06:15 +0000 |
commit | 624fd93aa77227138fd864d43fc9bdb84095de41 (patch) | |
tree | 713b3b1e5f8938f3c20d27da88e3a9e070754a31 /src | |
parent | 5e209bdccb44d7fbf3911629b4b9e771d8298b23 (diff) | |
download | r-alacritty-vte-624fd93aa77227138fd864d43fc9bdb84095de41.tar.gz r-alacritty-vte-624fd93aa77227138fd864d43fc9bdb84095de41.tar.bz2 r-alacritty-vte-624fd93aa77227138fd864d43fc9bdb84095de41.zip |
Bump rust-version to match actual MSRV
Diffstat (limited to 'src')
-rw-r--r-- | src/ansi.rs | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/ansi.rs b/src/ansi.rs index 2024164..1385802 100644 --- a/src/ansi.rs +++ b/src/ansi.rs @@ -678,9 +678,10 @@ pub struct CursorStyle { } /// Terminal cursor shape. -#[derive(Debug, Eq, PartialEq, Copy, Clone, Hash)] +#[derive(Debug, Default, Eq, PartialEq, Copy, Clone, Hash)] pub enum CursorShape { /// Cursor is a block like `▒`. + #[default] Block, /// Cursor is an underscore like `_`. @@ -696,12 +697,6 @@ pub enum CursorShape { Hidden, } -impl Default for CursorShape { - fn default() -> CursorShape { - CursorShape::Block - } -} - /// Terminal modes. #[derive(Debug, Eq, PartialEq)] pub enum Mode { @@ -1023,34 +1018,24 @@ pub enum Attr { } /// Identifiers which can be assigned to a graphic character set. -#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub enum CharsetIndex { /// Default set, is designated as ASCII at startup. + #[default] G0, G1, G2, G3, } -impl Default for CharsetIndex { - fn default() -> Self { - CharsetIndex::G0 - } -} - /// Standard or common character sets which can be designated as G0-G3. -#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub enum StandardCharset { + #[default] Ascii, SpecialCharacterAndLineDrawing, } -impl Default for StandardCharset { - fn default() -> Self { - StandardCharset::Ascii - } -} - impl StandardCharset { /// Switch/Map character to the active charset. Ascii is the common case and /// for that we want to do as little as possible. |