chore: formatting

This commit is contained in:
Greg Heartsfield 2022-08-21 09:51:34 -07:00
parent 79a982e3ef
commit 4fe6191aa3
2 changed files with 8 additions and 5 deletions

View File

@ -1 +1 @@
edition = "2018" edition = "2021"

View File

@ -468,8 +468,9 @@ async fn nostr_server(
Some(Ok(Message::Text(m))) => { Some(Ok(Message::Text(m))) => {
convert_to_msg(m) convert_to_msg(m)
}, },
Some(Ok(Message::Binary(_))) => { Some(Ok(Message::Binary(_))) => {
ws_stream.send(make_notice_message("binary messages are not accepted")).await.ok(); ws_stream.send(
make_notice_message("binary messages are not accepted")).await.ok();
continue; continue;
}, },
Some(Ok(Message::Ping(_))) | Some(Ok(Message::Pong(_))) => { Some(Ok(Message::Ping(_))) | Some(Ok(Message::Pong(_))) => {
@ -477,8 +478,10 @@ async fn nostr_server(
// send responses automatically. // send responses automatically.
continue; continue;
}, },
Some(Err(WsError::Capacity(MessageTooLong{size, max_size}))) => { Some(Err(WsError::Capacity(MessageTooLong(size, max_size)))) => {
ws_stream.send(make_notice_message(&format!("message too large ({} > {})",size, max_size))).await.ok(); ws_stream.send(
make_notice_message(
&format!("message too large ({} > {})",size, max_size))).await.ok();
continue; continue;
}, },
None | None |