diff --git a/examples/closures/src/lib.rs b/examples/closures/src/lib.rs index affcbf18..ac5a8f77 100644 --- a/examples/closures/src/lib.rs +++ b/examples/closures/src/lib.rs @@ -55,7 +55,8 @@ pub fn run() { document .get_element_by_id("current-time") .set_inner_html(&String::from( - Date::new().to_locale_string(JsString::from("en-GB"), JsValue::undefined()), + Date::new(JsValue::undefined()) + .to_locale_string("en-GB".into(), JsValue::undefined()), )); }