solution to exercise 04_03
This commit is contained in:
@@ -8,7 +8,13 @@ struct Ticket {
|
|||||||
|
|
||||||
// TODO: Implement the `PartialEq` trait for `Ticket`.
|
// TODO: Implement the `PartialEq` trait for `Ticket`.
|
||||||
|
|
||||||
impl PartialEq for Ticket {}
|
impl PartialEq for Ticket {
|
||||||
|
fn eq(&self, other: &Self) -> bool {
|
||||||
|
self.title == other.title
|
||||||
|
&& self.description == other.description
|
||||||
|
&& self.status == other.status
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|||||||
Reference in New Issue
Block a user