Rework StringPart.

When there are two possibilities, both of which use a `String`, it's
nicer to use a struct than an enum. Especially when mapping the contents
into a tuple.
This commit is contained in:
Nicholas Nethercote
2024-01-30 17:10:48 +11:00
parent 26eb6da4e7
commit 2621f7fd9b
2 changed files with 17 additions and 21 deletions

View File

@@ -197,7 +197,7 @@ pub struct StyledString {
pub style: Style,
}
#[derive(Copy, Clone, Debug, PartialEq, Hash, Encodable, Decodable)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Encodable, Decodable)]
pub enum Style {
MainHeaderMsg,
HeaderMsg,