diff options
Diffstat (limited to 'syn/codegen/src/json.rs')
-rw-r--r-- | syn/codegen/src/json.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/syn/codegen/src/json.rs b/syn/codegen/src/json.rs deleted file mode 100644 index 53904bf..0000000 --- a/syn/codegen/src/json.rs +++ /dev/null @@ -1,18 +0,0 @@ -use anyhow::Result; -use std::fs; -use std::path::Path; -use syn_codegen::Definitions; - -pub fn generate(defs: &Definitions) -> Result<()> { - let mut j = serde_json::to_string_pretty(&defs)?; - j.push('\n'); - - let check: Definitions = serde_json::from_str(&j)?; - assert_eq!(*defs, check); - - let codegen_root = Path::new(env!("CARGO_MANIFEST_DIR")); - let json_path = codegen_root.join("../syn.json"); - fs::write(json_path, j)?; - - Ok(()) -} |