From fa685e7018cd654a35d58ab55323ba5542dd104a Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 8 Nov 2023 12:30:58 +0100 Subject: [PATCH] .. --- crates/rattler_tuf/Cargo.toml | 2 +- crates/rattler_tuf/src/lib.rs | 4 ++-- crates/rattler_tuf/src/serialize.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/rattler_tuf/Cargo.toml b/crates/rattler_tuf/Cargo.toml index 433c65189..ce9420640 100644 --- a/crates/rattler_tuf/Cargo.toml +++ b/crates/rattler_tuf/Cargo.toml @@ -12,7 +12,7 @@ readme.workspace = true [dependencies] chrono = { version = "0.4.31", features = ["serde"] } -ed25519-dalek = "2.0.0" +ed25519-dalek = { version = "2.0.0", features = ["serde"] } hex = "0.4.3" serde = { version = "1.0.192", features = ["derive", "std"] } serde_json = "1.0.108" diff --git a/crates/rattler_tuf/src/lib.rs b/crates/rattler_tuf/src/lib.rs index 1dc2e1247..23a13ff5b 100644 --- a/crates/rattler_tuf/src/lib.rs +++ b/crates/rattler_tuf/src/lib.rs @@ -31,11 +31,11 @@ pub enum Type { pub struct Payload { pub delegations: BTreeMap, pub expiration: DateTime, + pub metadata_spec_version: MetadataSpecVersion, pub timestamp: DateTime, - pub version: Version, #[serde(rename = "type")] pub file_type: Type, - pub metadata_spec_version: MetadataSpecVersion, + pub version: Version, } impl Payload { diff --git a/crates/rattler_tuf/src/serialize.rs b/crates/rattler_tuf/src/serialize.rs index e5c25574d..d06e351b9 100644 --- a/crates/rattler_tuf/src/serialize.rs +++ b/crates/rattler_tuf/src/serialize.rs @@ -5,4 +5,4 @@ pub fn canonserialize(obj: &Value) -> Result, serde_json::Error> { let pretty_json = to_string_pretty(&obj)?; // Convert the JSON string to a utf-8 encoded vector of bytes Ok(pretty_json.into_bytes()) -} +} \ No newline at end of file