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