From 2290c72de1449716678993bdde6054bc2d401441 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Wed, 30 Sep 2020 23:27:41 +0800 Subject: [PATCH] Fix tests. --- codegen/src/lib.rs | 18 +++++++++--------- src/plugin.rs | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/codegen/src/lib.rs b/codegen/src/lib.rs index abd92df5..e5e10c53 100644 --- a/codegen/src/lib.rs +++ b/codegen/src/lib.rs @@ -1,6 +1,6 @@ //! This crate contains procedural macros to make creating Rhai plugin-modules much easier. //! -//! # Export an Entire Rust Module to a Rhai Module +//! # Export an Entire Rust Module to a Rhai `Module` //! //! ``` //! use rhai::{EvalAltResult, FLOAT}; @@ -32,7 +32,7 @@ //! } //! ``` //! -//! # Export a Rust Function to a Rhai Module +//! # Register a Rust Function with a Rhai `Module` //! //! ``` //! use rhai::{EvalAltResult, FLOAT, Module, RegisterFn}; @@ -63,7 +63,7 @@ //! } //! ``` //! -//! # Exporting a Function to an Engine +//! # Register a Plugin Function with an `Engine` //! //! ``` //! use rhai::{EvalAltResult, FLOAT, Module, RegisterFn}; @@ -106,7 +106,7 @@ mod test; /// /// # Usage /// -/// ```no_run +/// ```,no_run /// use rhai::plugin::*; /// /// #[export_fn] @@ -138,7 +138,7 @@ pub fn export_fn( /// /// # Usage /// -/// ```no_run +/// ```,no_run /// use rhai::plugin::*; /// /// #[export_module] @@ -168,7 +168,7 @@ pub fn export_module( /// /// # Usage /// -/// ```no_run +/// ```,no_run /// use rhai::plugin::*; /// /// #[export_module] @@ -203,7 +203,7 @@ pub fn exported_module(module_path: proc_macro::TokenStream) -> proc_macro::Toke /// /// # Usage /// -/// ```no_run +/// ```,no_run /// use rhai::plugin::*; /// /// #[export_module] @@ -232,7 +232,7 @@ pub fn combine_with_exported_module(args: proc_macro::TokenStream) -> proc_macro /// /// # Usage /// -/// ```no_run +/// ```,no_run /// use rhai::plugin::*; /// /// #[export_fn] @@ -262,7 +262,7 @@ pub fn register_exported_fn(args: proc_macro::TokenStream) -> proc_macro::TokenS /// /// # Usage /// -/// ```no_run +/// ```,no_run /// use rhai::plugin::*; /// /// #[export_fn] diff --git a/src/plugin.rs b/src/plugin.rs index f82056ea..d00ef28a 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -9,7 +9,7 @@ pub use crate::parser::FnAccess; pub use crate::result::EvalAltResult; pub use crate::utils::ImmutableString; -pub use crate::stdlib::{any::TypeId, boxed::Box, format, mem, vec as new_vec}; +pub use crate::stdlib::{any::TypeId, boxed::Box, format, mem, string::ToString, vec as new_vec}; #[cfg(not(features = "no_module"))] pub use rhai_codegen::*;