Skip to content

Commit 23599e3

Browse files
committed
chore: fmt
1 parent 71c1ead commit 23599e3

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

msg-socket/src/rep/mod.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ mod tests {
247247
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
248248
async fn rep_max_connections() {
249249
let _ = tracing_subscriber::fmt::try_init();
250-
let mut rep = RepSocket::with_options(Tcp::default(), RepOptions::default().with_max_clients(1));
250+
let mut rep =
251+
RepSocket::with_options(Tcp::default(), RepOptions::default().with_max_clients(1));
251252
rep.bind("127.0.0.1:0").await.unwrap();
252253
let addr = rep.local_addr().unwrap();
253254

@@ -264,15 +265,19 @@ mod tests {
264265

265266
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
266267
async fn test_basic_reqrep_with_compression() {
267-
let mut rep =
268-
RepSocket::with_options(Tcp::default(), RepOptions::default().with_min_compress_size(0))
269-
.with_compressor(SnappyCompressor);
268+
let mut rep = RepSocket::with_options(
269+
Tcp::default(),
270+
RepOptions::default().with_min_compress_size(0),
271+
)
272+
.with_compressor(SnappyCompressor);
270273

271274
rep.bind("0.0.0.0:4445").await.unwrap();
272275

273-
let mut req =
274-
ReqSocket::with_options(Tcp::default(), ReqOptions::default().with_min_compress_size(0))
275-
.with_compressor(GzipCompressor::new(6));
276+
let mut req = ReqSocket::with_options(
277+
Tcp::default(),
278+
ReqOptions::default().with_min_compress_size(0),
279+
)
280+
.with_compressor(GzipCompressor::new(6));
276281

277282
req.connect("0.0.0.0:4445").await.unwrap();
278283

msg/examples/durable.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ async fn main() {
6161
// and an identifier. This will implicitly turn on client authentication.
6262
let mut req = ReqSocket::with_options(
6363
Tcp::default(),
64-
ReqOptions::default().with_timeout(Duration::from_secs(4)).with_auth_token(Bytes::from("client1")),
64+
ReqOptions::default()
65+
.with_timeout(Duration::from_secs(4))
66+
.with_auth_token(Bytes::from("client1")),
6567
);
6668

6769
let (tx, rx) = oneshot::channel();

msg/examples/pubsub.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ async fn main() {
1919
);
2020

2121
// Configure the subscribers with options
22-
let mut sub1 =
23-
SubSocket::with_options(Tcp::default(), SubOptions::default().with_ingress_buffer_size(1024));
22+
let mut sub1 = SubSocket::with_options(
23+
Tcp::default(),
24+
SubOptions::default().with_ingress_buffer_size(1024),
25+
);
2426

2527
let mut sub2 = SubSocket::with_options(
2628
// TCP transport with blocking connect, usually connection happens in the background.

msg/examples/quic_vs_tcp.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ async fn run_tcp() {
2525
);
2626

2727
// Configure the subscribers with options
28-
let mut sub1 =
29-
SubSocket::with_options(Tcp::default(), SubOptions::default().with_ingress_buffer_size(1024));
28+
let mut sub1 = SubSocket::with_options(
29+
Tcp::default(),
30+
SubOptions::default().with_ingress_buffer_size(1024),
31+
);
3032

3133
tracing::info!("Setting up the sockets...");
3234
pub_socket.bind("127.0.0.1:0").await.unwrap();

0 commit comments

Comments
 (0)