From 485c8c2d6a2f0ec3e73c1e74bf72c786366ee13e Mon Sep 17 00:00:00 2001 From: 29 <791603901@qq.com> Date: Sat, 14 Dec 2024 17:47:41 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=97=EF=B8=8F=20(ServerBuilder):=20`cargo?= =?UTF-8?q?=20fmt`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tracing-surreal/src/tmp/server.rs | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/tracing-surreal/src/tmp/server.rs b/tracing-surreal/src/tmp/server.rs index c993131..50b0db2 100644 --- a/tracing-surreal/src/tmp/server.rs +++ b/tracing-surreal/src/tmp/server.rs @@ -266,15 +266,33 @@ impl ServerBuilder { } if path == auth_args.pusher_path { - return token_auth(query, auth_args.pusher_token, role_send, Role::Pusher, resp); + return token_auth( + query, + auth_args.pusher_token, + role_send, + Role::Pusher, + resp + ); } if path == auth_args.observer_path { - return token_auth(query, auth_args.observer_token, role_send, Role::Observer, resp); + return token_auth( + query, + auth_args.observer_token, + role_send, + Role::Observer, + resp + ); } if path == auth_args.director_path { - return token_auth(query, auth_args.director_token, role_send, Role::Director, resp); + return token_auth( + query, + auth_args.director_token, + role_send, + Role::Director, + resp + ); } Err(err_resp("invalid path!", StatusCode::NOT_FOUND)) @@ -288,7 +306,9 @@ impl ServerBuilder { println!("inner_err: {}", err); return; } - Ok(Ok(stream)) => (stream, role_recv.await.unwrap(), map_recv.await.ok()), + Ok(Ok(stream)) => { + (stream, role_recv.await.unwrap(), map_recv.await.ok()) + } } };