From 6fab9f5b6341ecf35a39c0fa4eca0fb306c00134 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Thu, 28 Jul 2022 18:08:21 +0800 Subject: [PATCH] Fix build. --- src/api/definitions/mod.rs | 3 +-- src/lib.rs | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/definitions/mod.rs b/src/api/definitions/mod.rs index 0b1e99ee..7eeee5fd 100644 --- a/src/api/definitions/mod.rs +++ b/src/api/definitions/mod.rs @@ -7,11 +7,10 @@ use crate::module::FuncInfo; use crate::plugin::*; use crate::tokenizer::{is_valid_function_name, Token}; use crate::{Engine, Module, Scope, INT}; -use core::fmt::Write; #[cfg(feature = "no_std")] use std::prelude::v1::*; -use std::{any::type_name, borrow::Cow, cmp::Ordering, fmt}; +use std::{any::type_name, borrow::Cow, cmp::Ordering, fmt, fmt::Write}; impl Engine { /// _(metadata, internals)_ Return [`Definitions`] that can be used to generate definition files diff --git a/src/lib.rs b/src/lib.rs index 091e267f..9ad7317f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -265,9 +265,6 @@ pub type OptimizationLevel = (); // Expose internal data structures. -#[cfg(feature = "metadata")] -pub use api::definitions::Definitions; - #[cfg(feature = "internals")] pub use types::dynamic::{AccessMode, DynamicReadLock, DynamicWriteLock, Variant}; @@ -312,6 +309,10 @@ pub use ast::FloatWrapper; #[cfg(feature = "internals")] pub use eval::{Caches, FnResolutionCache, FnResolutionCacheEntry, GlobalRuntimeState}; +#[cfg(feature = "internals")] +#[cfg(feature = "metadata")] +pub use api::definitions::Definitions; + /// Alias to [`smallvec::SmallVec<[T; 3]>`](https://crates.io/crates/smallvec), which is a /// specialized [`Vec`] backed by a small, inline, fixed-size array when there are ≤ 3 items stored. ///