janitor: silence compiler warning

If `fill_text` fails we have different problems :-)
This commit is contained in:
Simon Hausmann 2022-02-09 11:01:18 +01:00
parent 75bb4ac3df
commit c51cc35544

View file

@ -211,11 +211,9 @@ impl OpenGLContext {
context_2d.set_font("20px serif");
// We don't know if we're rendering on dark or white background, so choose a "color" in the middle for the text.
context_2d.set_fill_style(&wasm_bindgen::JsValue::from_str("red"));
context_2d.fill_text(
"Slint requires WebGL to be enabled in your browser",
0.,
30.,
);
context_2d
.fill_text("Slint requires WebGL to be enabled in your browser", 0., 30.)
.unwrap();
panic!("Cannot proceed without WebGL - aborting")
}
};