Change Dynamic to enum.

This commit is contained in:
Stephen Chung
2020-04-12 23:00:06 +08:00
parent 50a0f14bfc
commit 5152a40e93
13 changed files with 727 additions and 482 deletions

View File

@@ -2,8 +2,7 @@
#![allow(non_snake_case)]
use crate::any::{Any, Dynamic};
use crate::any::{Dynamic, Variant};
use crate::stdlib::{string::String, vec, vec::Vec};
/// Trait that represent arguments to a function call.
@@ -18,7 +17,7 @@ pub trait FuncArgs {
/// converted into `Dynamic`).
macro_rules! impl_args {
($($p:ident),*) => {
impl<$($p: Any + Clone),*> FuncArgs for ($($p,)*)
impl<$($p: Variant + Clone),*> FuncArgs for ($($p,)*)
{
fn into_vec(self) -> Vec<Dynamic> {
let ($($p,)*) = self;