From 64540d6a683e7d7b987e1f71ac5df2601060a96f Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Sat, 3 Aug 2024 14:07:43 -0400 Subject: [PATCH] Bump cursive-core to 0.4.2 and cursive to 0.21.1 --- cursive-core/Cargo.toml | 2 +- cursive-core/src/style/effect.rs | 12 ++++++------ cursive-core/src/style/style_types.rs | 6 +++++- cursive/Cargo.toml | 11 +++++++++-- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/cursive-core/Cargo.toml b/cursive-core/Cargo.toml index 7b1783d2..723e09db 100644 --- a/cursive-core/Cargo.toml +++ b/cursive-core/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" name = "cursive_core" readme = "README.md" repository = "https://github.com/gyscos/cursive" -version = "0.4.1" +version = "0.4.2" edition = "2021" rust-version = "1.61" include = ["src/**/*", "LICENSE", "README.md"] diff --git a/cursive-core/src/style/effect.rs b/cursive-core/src/style/effect.rs index 3d6feaee..f320ad40 100644 --- a/cursive-core/src/style/effect.rs +++ b/cursive-core/src/style/effect.rs @@ -2,6 +2,11 @@ use enum_map::{Enum, EnumMap}; use enumset::{EnumSet, EnumSetType}; use std::str::FromStr; +/// A concrete set of effects to enable. +/// +/// Every missing effect should be disabled. +pub type ConcreteEffects = EnumSet; + /// Text effect #[allow(clippy::derived_hash_with_manual_eq)] // We do derive it through EnumSetType #[derive(EnumSetType, Enum, Debug, Hash)] @@ -170,11 +175,6 @@ impl std::ops::IndexMut for Effects { } } -/// A concrete set of effects to enable. -/// -/// Every missing effect should be disabled. -pub type ConcreteEffects = EnumSet; - /// Describes what to do with an effect. #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)] pub enum EffectStatus { @@ -187,7 +187,7 @@ pub enum EffectStatus { /// Keep the same effect status as the parent. InheritParent, - /// Use the opposite state from the parent. + /// Use the opposite state from the parent (XOR). OppositeParent, } diff --git a/cursive-core/src/style/style_types.rs b/cursive-core/src/style/style_types.rs index 8f5947db..bd982744 100644 --- a/cursive-core/src/style/style_types.rs +++ b/cursive-core/src/style/style_types.rs @@ -10,6 +10,9 @@ use enumset::EnumSet; /// Combine a color and effects. /// /// Represents any transformation that can be applied to text. +/// +/// This is a "abstract" style, which can depend on the current theme, or on the previously active +/// style. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] pub struct Style { /// Effects to apply. @@ -21,7 +24,8 @@ pub struct Style { /// Combine a concrete color and effects. /// -/// This is a rendered version of `Style` or `StyleType`, which does not depend on the current theme. +/// This is a rendered version of `Style` or `StyleType`, which does not depend on the current +/// theme or the previously active style. #[derive(Clone, Copy, Default, Debug, PartialEq, Eq, Hash)] pub struct ConcreteStyle { /// Effect to apply. diff --git a/cursive/Cargo.toml b/cursive/Cargo.toml index 3519aa8d..b5beb02f 100644 --- a/cursive/Cargo.toml +++ b/cursive/Cargo.toml @@ -9,11 +9,18 @@ license = "MIT" name = "cursive" readme = "README.md" repository = "https://github.com/gyscos/cursive" -version = "0.21.0" +version = "0.21.1" include = ["src/**/*", "LICENSE", "README.md"] [package.metadata.docs.rs] -all-features = true +features = [ + "doc-cfg", + "ansi", "toml", "markdown", + "builder", + "termion-backend", + "crossterm-backend", + "pancurses-backend", +] [dependencies] cursive_core = { path = "../cursive-core", version= "0.4.0"}