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;
|
use crate::Reaction;
|
||||||
|
|
||||||
/// Comments associated to an issue or a pull/merge request within the repository of a forge (Gitea, GitLab, etc.).",
|
/// 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 {
|
pub struct Comment {
|
||||||
/// Unique identifier of the issue or pull/merge request containing the comment
|
/// Unique identifier of the issue or pull/merge request containing the comment
|
||||||
pub issue_index: usize,
|
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, 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
|
/// forge to another. The first element is the id in the source forge, the second element is the id
|
||||||
/// in the destination forge.
|
/// in the destination forge.
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
|
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
|
||||||
pub struct Identities {
|
pub struct Identities {
|
||||||
pub pairs: Vec<usize>,
|
pub pairs: Vec<usize>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// Label associated to an issue or a comment
|
/// 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 {
|
pub struct Label {
|
||||||
/// Unique identifier of the label
|
/// Unique identifier of the label
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// Reaction associated to an issue or a comment
|
/// 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 {
|
pub struct Reaction {
|
||||||
/// Unique identifier of the reaction
|
/// Unique identifier of the reaction
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// VCS repository relative to a project.
|
/// VCS repository relative to a project.
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
|
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
|
||||||
pub struct Repository {
|
pub struct Repository {
|
||||||
/// Suffix to add to the clone URL of the project to access the repository.
|
/// Suffix to add to the clone URL of the project to access the repository.
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// A list of categories associated with a project.
|
/// 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 {
|
pub struct Topic {
|
||||||
/// Unique identifier of the topic
|
/// Unique identifier of the topic
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// A forge user
|
/// A forge user
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
|
#[derive(Clone, Debug, Serialize, Deserialize, Default, Eq, PartialEq)]
|
||||||
pub struct User {
|
pub struct User {
|
||||||
/// Unique identifier of the user
|
/// Unique identifier of the user
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
|
|
Loading…
Reference in a new issue