From 3605301868e10d021ab2e527c814ed5f620b1850 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Fri, 30 Aug 2019 14:13:13 -0700 Subject: [PATCH] fix option type --- reflection/Cargo.toml | 2 +- reflection/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reflection/Cargo.toml b/reflection/Cargo.toml index 48c2649..b63e123 100644 --- a/reflection/Cargo.toml +++ b/reflection/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reflection" -version = "0.1.3" +version = "0.1.4" authors = ["oooutlk "] license = "MIT" keywords = [ "reflect", "reflection", "type", "schema", "tree" ] diff --git a/reflection/src/lib.rs b/reflection/src/lib.rs index 4363a11..86a1bd6 100644 --- a/reflection/src/lib.rs +++ b/reflection/src/lib.rs @@ -290,7 +290,7 @@ impl Reflection for Vec where T: Reflection { } impl Reflection for Option where T: Reflection { - fn ty() -> Type { Type::Enum } + fn ty() -> Type { Type::Option } fn name() -> Name { Some( format!( "Option<{}>", name_!(T) ))} fn schema( id: Id ) -> Schema { field( id, Type::Option, name!(Self), expander!(Self) )} fn members() -> Schemas {