Fix clippy

This commit is contained in:
Jonathan Kelley 2023-07-14 16:34:49 -07:00
parent 4147498041
commit d583e1c750
No known key found for this signature in database
GPG Key ID: 1FBB50F7EB0A08BE
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ pub fn App(cx: Scope) -> Element {
fn DataEditor(cx: Scope, id: usize) -> Element {
let cool_data = use_shared_state::<CoolData>(cx).unwrap().read();
let my_data = &cool_data.view(&id).unwrap();
let my_data = &cool_data.view(id).unwrap();
render!(p {
"{my_data}"
@ -68,7 +68,7 @@ fn DataView(cx: Scope, id: usize) -> Element {
let oninput = |e: FormEvent| cool_data.write().set(*id, e.value.clone());
let cool_data = cool_data.read();
let my_data = &cool_data.view(&id).unwrap();
let my_data = &cool_data.view(id).unwrap();
render!(input {
oninput: oninput,