Remove expect followed by function call
This commit is contained in:
parent
d928ee93b7
commit
b1239dbd2a
|
@ -210,9 +210,7 @@ pub fn set_attribute(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_color(hex: &str) -> Color {
|
fn parse_color(hex: &str) -> Color {
|
||||||
Color::hex(hex).expect(&format!(
|
Color::hex(hex).unwrap_or_else(|_| panic!("Encountered invalid bevy_dioxus Color hex `{hex}`."))
|
||||||
"Encountered invalid bevy_dioxus Color hex `{hex}`."
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_f32(float: &str) -> f32 {
|
fn parse_f32(float: &str) -> f32 {
|
||||||
|
|
Loading…
Reference in a new issue