feat: implement eq and partial eq for all types
This commit is contained in:
parent
d1eff66bab
commit
e47c3cf6bb
7 changed files with 7 additions and 7 deletions
|
@ -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,
|
||||
|
|
|
@ -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>,
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue