Replace single-character string const with char

This commit is contained in:
Robert Dodd 2024-01-03 08:52:59 +11:00
parent 6bc4725e22
commit b2174b0064

View file

@ -173,7 +173,7 @@ pub fn set_attribute(
("visibility", "inherited") => *visibility = Visibility::Inherited,
("visibility", "hidden") => *visibility = Visibility::Hidden,
("visibility", "visible") => *visibility = Visibility::Visible,
("z_index", value) => match value.split_once(":") {
("z_index", value) => match value.split_once(':') {
Some(("local", value)) => *z_index = ZIndex::Local(parse_i32(value)),
Some(("global", value)) => *z_index = ZIndex::Global(parse_i32(value)),
None => *z_index = ZIndex::Local(parse_i32(value)),