From 36fd55a7e4aa147f96381de0dc90672cf8197372 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sat, 25 Jul 2020 20:13:41 +0900 Subject: [PATCH] Use result of local storage insert operation to suppress Clippy --- plume-front/src/editor.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plume-front/src/editor.rs b/plume-front/src/editor.rs index ab211dfd..c390d994 100644 --- a/plume-front/src/editor.rs +++ b/plume-front/src/editor.rs @@ -269,7 +269,13 @@ pub fn init() -> Result<(), EditorError> { let editor_button = document().create_element("a")?; js! { @{&editor_button}.href = "#"; } editor_button.add_event_listener(|_: ClickEvent| { - window().local_storage().insert("basic-editor", "false"); + if window() + .local_storage() + .insert("basic-editor", "false") + .is_err() + { + console!(log, "Failed to write into local storage"); + } window().history().go(0).ok(); // refresh }); editor_button.append_child(