Change init_with_level to init in examples
This commit is contained in:
parent
052fe0edae
commit
fbc9ef74c4
4 changed files with 2 additions and 4 deletions
|
|
@ -19,6 +19,5 @@ iced_wgpu.features = ["webgl"]
|
|||
|
||||
console_error_panic_hook = "0.1"
|
||||
console_log = "1.0"
|
||||
log.workspace = true
|
||||
wasm-bindgen = "0.2"
|
||||
web-sys = { version = "0.3", features = ["Element", "HtmlCanvasElement", "Window", "Document"] }
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ use winit::platform::web::WindowBuilderExtWebSys;
|
|||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
let canvas_element = {
|
||||
console_log::init_with_level(log::Level::Debug)?;
|
||||
console_log::init().expect("Initialize logger");
|
||||
|
||||
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
|
||||
|
||||
|
|
|
|||
|
|
@ -18,4 +18,3 @@ iced.features = ["image", "debug", "webgl"]
|
|||
|
||||
console_error_panic_hook = "0.1"
|
||||
console_log = "1.0"
|
||||
log.workspace = true
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use iced::{Color, Element, Font, Length, Renderer, Sandbox, Settings};
|
|||
pub fn main() -> iced::Result {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
{
|
||||
console_log::init_with_level(log::Level::Debug).expect("Initialize logger");
|
||||
console_log::init().expect("Initialize logger");
|
||||
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue