diff --git a/Cargo.toml b/Cargo.toml index 814d362f..6649f616 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "console" description = "A terminal and console abstraction for Rust" -version = "0.16.1" +version = "0.16.2" keywords = ["cli", "terminal", "colors", "console", "ansi"] license = "MIT" edition = "2021" @@ -10,6 +10,7 @@ repository = "https://github.com/console-rs/console" documentation = "https://docs.rs/console" readme = "README.md" rust-version = "1.71" +include = ["CHANGELOG.md", "Cargo.toml", "LICENSE", "README.md", "src/**/*.rs"] [features] default = ["unicode-width", "ansi-parsing", "std"] diff --git a/src/ansi.rs b/src/ansi.rs index d13d16e9..09239be4 100644 --- a/src/ansi.rs +++ b/src/ansi.rs @@ -6,8 +6,9 @@ use core::{ str::CharIndices, }; -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, Default)] enum State { + #[default] Start, S1, S2, @@ -23,12 +24,6 @@ enum State { Trap, } -impl Default for State { - fn default() -> Self { - Self::Start - } -} - impl State { fn is_final(&self) -> bool { #[allow(clippy::match_like_matches_macro)]