Skip to content

Commit

Permalink
⚗️ (ServerBuilder): cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
czy-29 committed Dec 14, 2024
1 parent 173c730 commit 485c8c2
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions tracing-surreal/src/tmp/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,33 @@ impl<C: Connection + Clone> ServerBuilder<C> {
}

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))
Expand All @@ -288,7 +306,9 @@ impl<C: Connection + Clone> ServerBuilder<C> {
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())
}
}
};

Expand Down

0 comments on commit 485c8c2

Please sign in to comment.