From 27334970382ee00c9d572d5ed864253f38749c6d Mon Sep 17 00:00:00 2001 From: Matt Hunzinger Date: Thu, 12 Sep 2024 20:51:42 -0400 Subject: [PATCH] Simplify TodoMVC example (#2935) * Remove id field from TodoItem * Remove derived traits from TodoItem --- examples/todomvc.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/todomvc.rs b/examples/todomvc.rs index bce2d2e9c..ea2e528a1 100644 --- a/examples/todomvc.rs +++ b/examples/todomvc.rs @@ -16,9 +16,7 @@ enum FilterState { Completed, } -#[derive(Debug, PartialEq, Eq)] struct TodoItem { - id: u32, checked: bool, contents: String, } @@ -120,7 +118,6 @@ fn TodoHeader(mut todos: Signal>) -> Element { if evt.key() == Key::Enter && !draft.read().is_empty() { let id = todo_id(); let todo = TodoItem { - id, checked: false, contents: draft.to_string(), };