You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2019/07/01 15:40:49 UTC

[thrift] 02/02: bug fixed

This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 5338d99176756eefc21fe5c3f2eed3fab99ef715
Author: jose andres <jo...@gmail.com>
AuthorDate: Tue May 14 15:38:21 2019 +0200

    bug fixed
    
    Use TTcpChannel instead of TTcpTransport
---
 tutorial/rs/README.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tutorial/rs/README.md b/tutorial/rs/README.md
index a686b9b..8ad39ad 100644
--- a/tutorial/rs/README.md
+++ b/tutorial/rs/README.md
@@ -35,12 +35,13 @@ extern crate thrift;
 extern crate try_from;
 
 // generated Rust module
-use tutorial;
+mod tutorial;
 
 use thrift::protocol::{TCompactInputProtocol, TCompactOutputProtocol};
 use thrift::protocol::{TInputProtocol, TOutputProtocol};
 use thrift::transport::{TFramedReadTransport, TFramedWriteTransport};
 use thrift::transport::{TIoChannel, TTcpChannel};
+
 use tutorial::{CalculatorSyncClient, TCalculatorSyncClient};
 use tutorial::{Operation, Work};
 
@@ -60,7 +61,7 @@ fn run() -> thrift::Result<()> {
     //
 
     println!("connect to server on 127.0.0.1:9090");
-    let mut c = TTcpTransport::new();
+    let mut c = TTcpChannel::new();
     c.open("127.0.0.1:9090")?;
 
     let (i_chan, o_chan) = c.split()?;
@@ -72,7 +73,7 @@ fn run() -> thrift::Result<()> {
         TFramedWriteTransport::new(o_chan)
     );
 
-    let client = CalculatorSyncClient::new(i_prot, o_prot);
+    let mut client = CalculatorSyncClient::new(i_prot, o_prot);
 
     //
     // alright! - let's make some calls