Skip to content

Commit 0bca859

Browse files
committed
chore: merge clean up
1 parent 59cfc8e commit 0bca859

File tree

3 files changed

+5
-85
lines changed

3 files changed

+5
-85
lines changed

rust/catalyst-signed-doc-macro/src/field.rs

Lines changed: 0 additions & 80 deletions
This file was deleted.

rust/catalyst-signed-doc-macro/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//! spec.
33
44
mod error;
5-
mod field;
65
mod rules;
76
mod signed_doc_spec;
87
mod types_consts;

rust/catalyst-signed-doc-macro/src/signed_doc_spec/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
//! Catalyst Signed Document spec type
22
33
pub(crate) mod doc_ref;
4+
pub(crate) mod field;
45

56
use std::{collections::HashMap, ops::Deref};
67

78
use proc_macro2::Ident;
89
use quote::format_ident;
910

10-
use crate::field;
11-
1211
/// Catalyst Signed Document spec representation struct
1312
#[derive(serde::Deserialize)]
1413
pub(crate) struct CatalystSignedDocSpec {
@@ -46,7 +45,8 @@ pub(crate) struct DocSpec {
4645
/// Document type UUID v4 value
4746
#[serde(rename = "type")]
4847
pub(crate) doc_type: String,
49-
48+
/// `headers` field
49+
pub(crate) headers: field::Headers,
5050
/// Document type metadata definitions
5151
pub(crate) metadata: Metadata,
5252
}
@@ -105,7 +105,8 @@ impl CatalystSignedDocSpec {
105105
// #[allow(dependency_on_unit_never_type_fallback)]
106106
pub(crate) fn load_signed_doc_spec() -> anyhow::Result<CatalystSignedDocSpec> {
107107
let signed_doc_str = include_str!("../../../../specs/signed_doc.json");
108-
let signed_doc_spec = serde_json::from_str(signed_doc_str)?;
108+
let signed_doc_spec = serde_json::from_str(signed_doc_str)
109+
.map_err(|e| anyhow::anyhow!("Invalid Catalyst Signed Documents JSON Spec: {e}"))?;
109110
Ok(signed_doc_spec)
110111
}
111112
}

0 commit comments

Comments
 (0)