summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2024-03-15 19:32:07 +0100
committerCyborus <cyborus@cyborus.xyz>2024-03-15 19:32:07 +0100
commita30f11406402ba6a2a36ef43ff8096b8f2f0dab2 (patch)
treeaaf0babe7c7d756fbddcafd3a6251da94b391284 /generator
parentdon't implement `as_str` for enums that don't need it (diff)
downloadforgejo-api-a30f11406402ba6a2a36ef43ff8096b8f2f0dab2.tar.xz
forgejo-api-a30f11406402ba6a2a36ef43ff8096b8f2f0dab2.zip
derive `Copy` and `Eq` for enums
Diffstat (limited to 'generator')
-rw-r--r--generator/src/structs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/src/structs.rs b/generator/src/structs.rs
index 9dc6fc7..7daa8d4 100644
--- a/generator/src/structs.rs
+++ b/generator/src/structs.rs
@@ -147,7 +147,7 @@ pub fn create_enum(
let strukt = format!(
"
{docs}
-#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum {name} {{
{variants}
}}"