mirror of
https://github.com/OMGeeky/tarpc.git
synced 2025-12-27 22:59:51 +01:00
Run cargo fmt
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
use clap::{App, Arg};
|
||||
use std::{io, net::SocketAddr};
|
||||
use tarpc::{client, context};
|
||||
use tokio::net::TcpStream;
|
||||
use tokio_serde::formats::Json;
|
||||
use tokio_util::codec::LengthDelimitedCodec;
|
||||
use tokio::net::TcpStream;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> io::Result<()> {
|
||||
@@ -47,11 +47,12 @@ async fn main() -> io::Result<()> {
|
||||
|
||||
let conn = TcpStream::connect(server_addr).await?;
|
||||
let transport = tarpc::serde_transport::new(
|
||||
LengthDelimitedCodec::builder().max_frame_length(4294967296).new_framed(conn),
|
||||
LengthDelimitedCodec::builder()
|
||||
.max_frame_length(4294967296)
|
||||
.new_framed(conn),
|
||||
Json::default(),
|
||||
);
|
||||
|
||||
|
||||
// WorldClient is generated by the service attribute. It has a constructor `new` that takes a
|
||||
// config and any Transport as input.
|
||||
let mut client = service::WorldClient::new(client::Config::default(), transport).spawn()?;
|
||||
|
||||
Reference in New Issue
Block a user