Skip to content

Commit 1dce369

Browse files
committed
Fix thrift examples
1 parent 73e8e5d commit 1dce369

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/thrift_client/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
//! use rbfrt::thrift_generated::ts::{TsSyncClient, TTsSyncClient};
2424
//!
2525
//! # fn example() -> Result<(), Box<dyn std::error::Error>> {
26-
//! // Create Thrift client with all protocol setup done
27-
//! let mut ts_client: TsSyncClient<_, _> = thrift_client::connect("localhost:9090")?;
26+
//! // Create protocol pair and build a service client from it.
27+
//! let (i_prot, o_prot) = thrift_client::connect("localhost:9090", "ts")?;
28+
//! let mut ts_client = TsSyncClient::new(i_prot, o_prot);
2829
//!
29-
//! // Use ALL Thrift APIs directly
30+
//! // Use generated Thrift APIs directly.
3031
//! ts_client.ts_global_ts_value_set(0, 1_000_000_000)?;
3132
//! # Ok(())
3233
//! # }

0 commit comments

Comments
 (0)