From 460f76e6f73c0e4ac251f5f2d6a8988df10f1b5a Mon Sep 17 00:00:00 2001 From: bokuweb Date: Tue, 30 Jun 2020 18:50:12 +0900 Subject: [PATCH] fix: make outout fields public (#11) --- raiden-derive/src/ops/get.rs | 2 +- raiden-derive/src/ops/put.rs | 2 +- raiden-derive/src/ops/query.rs | 2 +- raiden/examples/put.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/raiden-derive/src/ops/get.rs b/raiden-derive/src/ops/get.rs index 614c1583..4954f764 100644 --- a/raiden-derive/src/ops/get.rs +++ b/raiden-derive/src/ops/get.rs @@ -18,7 +18,7 @@ pub(crate) fn expand_get_item( let ident = &f.ident.clone().unwrap(); let ty = &f.ty; quote! { - #ident: #ty, + pub #ident: #ty, } }); diff --git a/raiden-derive/src/ops/put.rs b/raiden-derive/src/ops/put.rs index 43db30c9..72b5069e 100644 --- a/raiden-derive/src/ops/put.rs +++ b/raiden-derive/src/ops/put.rs @@ -29,7 +29,7 @@ pub(crate) fn expand_put_item( let ident = &f.ident.clone().unwrap(); let ty = &f.ty; quote! { - #ident: #ty, + pub #ident: #ty, } }); diff --git a/raiden-derive/src/ops/query.rs b/raiden-derive/src/ops/query.rs index bc6a1a0e..26562990 100644 --- a/raiden-derive/src/ops/query.rs +++ b/raiden-derive/src/ops/query.rs @@ -18,7 +18,7 @@ pub(crate) fn expand_query( let ident = &f.ident.clone().unwrap(); let ty = &f.ty; quote! { - #ident: #ty, + pub #ident: #ty, } }); quote! { diff --git a/raiden/examples/put.rs b/raiden/examples/put.rs index bd440133..1979596a 100644 --- a/raiden/examples/put.rs +++ b/raiden/examples/put.rs @@ -1,7 +1,7 @@ use raiden::*; #[derive(Debug, Clone, PartialEq)] -struct CustomId(String); +pub struct CustomId(String); impl Into for String { fn into(self) -> CustomId {