rust to add uuid support
diff --git a/test/rs/Cargo.toml b/test/rs/Cargo.toml
index b039fff..da53b96 100644
--- a/test/rs/Cargo.toml
+++ b/test/rs/Cargo.toml
@@ -11,7 +11,7 @@
bitflags = "=1.2"
env_logger = "0.8"
log = "0.4"
+uuid = "1"
[dependencies.thrift]
path = "../../lib/rs"
-
diff --git a/test/rs/Makefile.am b/test/rs/Makefile.am
index 103f80c..78db5ee 100644
--- a/test/rs/Makefile.am
+++ b/test/rs/Makefile.am
@@ -17,8 +17,8 @@
# under the License.
#
-stubs: ../v0.16/ThriftTest.thrift
- $(THRIFT) -I ./thrifts -out src --gen rs ../v0.16/ThriftTest.thrift
+stubs: ../ThriftTest.thrift
+ $(THRIFT) -I ./thrifts -out src --gen rs ../ThriftTest.thrift
precross: stubs
$(CARGO) build
diff --git a/test/rs/src/bin/test_client.rs b/test/rs/src/bin/test_client.rs
index a44bac3..fd3a185 100644
--- a/test/rs/src/bin/test_client.rs
+++ b/test/rs/src/bin/test_client.rs
@@ -231,6 +231,12 @@
"thing".to_owned(),
)?;
+ info!("testUuid");
+ verify_expected_result(
+ thrift_test_client.test_uuid(uuid::uuid!("00010203-0405-0607-0809-0a0b0c0d0e0f")),
+ uuid::uuid!("00010203-0405-0607-0809-0a0b0c0d0e0f"),
+ )?;
+
info!("testBool");
verify_expected_result(thrift_test_client.test_bool(true), true)?;
diff --git a/test/rs/src/bin/test_server.rs b/test/rs/src/bin/test_server.rs
index 92a4bcc..3e622d5 100644
--- a/test/rs/src/bin/test_server.rs
+++ b/test/rs/src/bin/test_server.rs
@@ -174,6 +174,11 @@
Ok(thing)
}
+ fn handle_test_uuid(&self, thing: uuid::Uuid) -> thrift::Result<uuid::Uuid> {
+ info!("testUUID({})", &thing);
+ Ok(thing)
+ }
+
fn handle_test_bool(&self, thing: bool) -> thrift::Result<bool> {
info!("testBool({})", thing);
Ok(thing)