From 853d0593d061119b042a45b602ff52af229dad83 Mon Sep 17 00:00:00 2001 From: mo8it Date: Tue, 26 Mar 2024 17:47:33 +0100 Subject: [PATCH] Derive Eq when PartialEq is derived --- src/exercise.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exercise.rs b/src/exercise.rs index 664b362..a13ed2c 100644 --- a/src/exercise.rs +++ b/src/exercise.rs @@ -58,7 +58,7 @@ pub struct Exercise { // An enum to track of the state of an Exercise. // An Exercise can be either Done or Pending -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Eq, Debug)] pub enum State { // The state of the exercise once it's been completed Done, @@ -67,7 +67,7 @@ pub enum State { } // The context information of a pending exercise -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Eq, Debug)] pub struct ContextLine { // The source code that is still pending completion pub line: String,