mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-14 06:59:07 -05:00
chore: formatting
This commit is contained in:
parent
79a982e3ef
commit
4fe6191aa3
|
@ -1 +1 @@
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
11
src/main.rs
11
src/main.rs
|
@ -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 |
|
||||||
|
|
Loading…
Reference in New Issue
Block a user