feat: implement eq and partial eq for all types

This commit is contained in:
Aravinth Manivannan 2023-01-03 12:29:26 +05:30
parent d1eff66bab
commit e47c3cf6bb
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
7 changed files with 7 additions and 7 deletions

View file

@ -21,7 +21,7 @@ use serde::{Deserialize, Serialize};
use crate::Reaction;
/// Comments associated to an issue or a pull/merge request within the repository of a forge (Gitea, GitLab, etc.).",
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
pub struct Comment {
/// Unique identifier of the issue or pull/merge request containing the comment
pub issue_index: usize,

View file

@ -21,7 +21,7 @@ use serde::{Deserialize, Serialize};
/// forge, the second element is the id in the destination forge.Pairs of identities mapping one
/// forge to another. The first element is the id in the source forge, the second element is the id
/// in the destination forge.
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
pub struct Identities {
pub pairs: Vec<usize>,
}

View file

@ -19,7 +19,7 @@
use serde::{Deserialize, Serialize};
/// Label associated to an issue or a comment
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
pub struct Label {
/// Unique identifier of the label
pub index: usize,

View file

@ -18,7 +18,7 @@
use serde::{Deserialize, Serialize};
/// Reaction associated to an issue or a comment
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
pub struct Reaction {
/// Unique identifier of the reaction
pub index: usize,

View file

@ -18,7 +18,7 @@
use serde::{Deserialize, Serialize};
/// VCS repository relative to a project.
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
pub struct Repository {
/// Suffix to add to the clone URL of the project to access the repository.
pub name: String,

View file

@ -18,7 +18,7 @@
use serde::{Deserialize, Serialize};
/// A list of categories associated with a project.
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
pub struct Topic {
/// Unique identifier of the topic
pub index: usize,

View file

@ -18,7 +18,7 @@
use serde::{Deserialize, Serialize};
/// A forge user
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
pub struct User {
/// Unique identifier of the user
pub index: usize,