From 3cdf1f662ec2eb4dc40ff9870877bf41082aa4f5 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 28 Aug 2021 17:01:36 +0200 Subject: [PATCH] Reorganize support re-exports to support preservesless usage of preserves_schema --- implementations/rust/preserves-schema/src/compiler/mod.rs | 5 +++-- implementations/rust/preserves-schema/src/support/mod.rs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/implementations/rust/preserves-schema/src/compiler/mod.rs b/implementations/rust/preserves-schema/src/compiler/mod.rs index 98ec8ba..eb8ac91 100644 --- a/implementations/rust/preserves-schema/src/compiler/mod.rs +++ b/implementations/rust/preserves-schema/src/compiler/mod.rs @@ -172,10 +172,11 @@ pub fn compile(config: &CompilerConfig) -> io::Result<()> { lines.push("#![allow(unused_imports)]".to_owned()); lines.push("".to_owned()); lines.push("use std::convert::TryFrom;".to_owned()); - lines.push("use preserves::value::Domain;".to_owned()); - lines.push("use preserves::value::NestedValue;".to_owned()); lines.push(format!("use {}::support as _support;", &config.support_crate)); lines.push("use _support::Deserialize;".to_owned()); + lines.push("use _support::preserves;".to_owned()); + lines.push("use preserves::value::Domain;".to_owned()); + lines.push("use preserves::value::NestedValue;".to_owned()); lines.push("".to_owned()); for mode in &modes { diff --git a/implementations/rust/preserves-schema/src/support/mod.rs b/implementations/rust/preserves-schema/src/support/mod.rs index e42f8f9..6b3ca15 100644 --- a/implementations/rust/preserves-schema/src/support/mod.rs +++ b/implementations/rust/preserves-schema/src/support/mod.rs @@ -1,5 +1,6 @@ pub use lazy_static::lazy_static; +pub use preserves; pub use preserves::value::Reader; pub use preserves::value::boundary as B;