nostr-rs-relay

My dev fork of nostr-rs-relay
git clone git://jb55.com/nostr-rs-relay
Log | Files | Refs | README | LICENSE

commit 4fe6191aa3607988ce4b4510cbcdc9d0e65676a0
parent 79a982e3efb63e372a0c743313fb6ebd1f11b5de
Author: Greg Heartsfield <scsibug@imap.cc>
Date:   Sun, 21 Aug 2022 09:51:34 -0700

chore: formatting

Diffstat:
Mrustfmt.toml | 2+-
Msrc/main.rs | 11+++++++----
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/rustfmt.toml b/rustfmt.toml @@ -1 +1 @@ -edition = "2018" +edition = "2021" diff --git a/src/main.rs b/src/main.rs @@ -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 |