Minor refactor.

This commit is contained in:
Stephen Chung
2022-01-14 21:49:38 +08:00
parent e2e0b8d083
commit ae77582028
4 changed files with 34 additions and 24 deletions

View File

@@ -91,6 +91,7 @@ impl FuncInfo {
///
/// `()` is cleared.
/// [`RhaiResult`][crate::RhaiResult] and [`RhaiResultOf<T>`] are expanded.
#[cfg(feature = "metadata")]
pub fn format_return_type(typ: &str) -> std::borrow::Cow<str> {
const RHAI_RESULT_TYPE: &str = "RhaiResult";
const RHAI_RESULT_TYPE_EXPAND: &str = "Result<Dynamic, Box<EvalAltResult>>";