From ede029e5a47b389f10741a59b2060f1d90e31d75 Mon Sep 17 00:00:00 2001 From: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com> Date: Fri, 7 Jul 2023 17:15:41 -0400 Subject: [PATCH] Only declare module tree once in `trustfall_stubgen`. (#351) Applies the best practice described here: https://doc.rust-lang.org/book/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html#best-practices-for-packages-with-a-binary-and-a-library --- trustfall_stubgen/src/main.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/trustfall_stubgen/src/main.rs b/trustfall_stubgen/src/main.rs index 5fc577c1..906a54cb 100644 --- a/trustfall_stubgen/src/main.rs +++ b/trustfall_stubgen/src/main.rs @@ -5,13 +5,6 @@ use std::path::PathBuf; use anyhow::Context; use clap::Parser; -mod adapter_creator; -mod edges_creator; -mod entrypoints_creator; -mod properties_creator; -mod root; -mod util; - /// Generate a Trustfall adapter stub implementation for a given schema. #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] @@ -64,5 +57,5 @@ fn main() -> Result<(), anyhow::Error> { let target = &cli.target; std::fs::create_dir_all(target).context("failed to create target directory")?; - root::generate_rust_stub(&schema_text, target) + trustfall_stubgen::generate_rust_stub(&schema_text, target) }