Use unreachable! instead of panic! in attr serialize

This commit is contained in:
Tyler Hallada 2020-05-09 22:37:56 -04:00
parent 1a28b26121
commit 6b9734143c

View File

@ -549,7 +549,7 @@ impl<'arena> Serialize for Node<'arena> {
if let Some(serialized_declarations) = &at.serialized_value { if let Some(serialized_declarations) = &at.serialized_value {
(&at.name, serialized_declarations.as_str()) (&at.name, serialized_declarations.as_str())
} else { } else {
panic!("Serialized style attribute value was not saved to the arena"); unreachable!("Serialized style attribute value was not saved to the arena");
} }
} }
Attribute::Text(at) => (&at.name, &at.value[..]), Attribute::Text(at) => (&at.name, &at.value[..]),