From 5111a3d5749625c3d8e26a24a5a32c4da58f18d3 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Thu, 30 Nov 2023 23:51:18 +0300 Subject: net: Use ToConn and ToListener traits for objects that can be converted to Conn and Listener. --- jsonrpc/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'jsonrpc/src/lib.rs') diff --git a/jsonrpc/src/lib.rs b/jsonrpc/src/lib.rs index 65fb38f..da9047d 100644 --- a/jsonrpc/src/lib.rs +++ b/jsonrpc/src/lib.rs @@ -27,7 +27,7 @@ //! // Creates a new server //! let listener = TcpListener::bind("127.0.0.1:60000").await.unwrap(); //! let config = ServerConfig::default(); -//! let server = Server::new(listener.into(), config, ex.clone()); +//! let server = Server::new(listener, config, ex.clone()); //! //! // Register the HelloWorld service //! register_service!(HelloWorld, say_hello); @@ -43,7 +43,7 @@ //! // Creates a new client //! let conn = TcpStream::connect("127.0.0.1:60000").await.unwrap(); //! let config = ClientConfig::default(); -//! let client = Client::new(conn.into(), config); +//! let client = Client::new(conn, config); //! //! let result: String = client.call("HelloWorld.say_hello", "world".to_string()).await.unwrap(); //! }; -- cgit v1.2.3