submissions-api: need stupid dependency to do this

This commit is contained in:
Quaternions 2024-12-17 20:06:46 -08:00
parent 3ea881e724
commit 0dc39121c8
4 changed files with 15 additions and 1 deletions

1
validation/Cargo.lock generated
View File

@ -1809,6 +1809,7 @@ dependencies = [
"reqwest",
"serde",
"serde_json",
"serde_repr",
"url",
]

View File

@ -895,6 +895,17 @@ dependencies = [
"serde",
]
[[package]]
name = "serde_repr"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
@ -957,6 +968,7 @@ dependencies = [
"reqwest",
"serde",
"serde_json",
"serde_repr",
"url",
]

View File

@ -14,6 +14,7 @@ authors = ["Rhys Lloyd <krakow20@gmail.com>"]
reqwest = { version = "0", features = ["json"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_repr = "0.1.19"
url = "2"
[features]

View File

@ -31,7 +31,7 @@ pub struct ScriptIDResponse{
pub ID:ScriptID,
}
#[derive(serde::Serialize,serde::Deserialize)]
#[derive(serde_repr::Serialize_repr,serde_repr::Deserialize_repr)]
#[repr(i32)]
pub enum Policy{
None=0, // not yet reviewed