Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
heeckhau committed Jan 6, 2025
1 parent f5456d8 commit 541bcaf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/notary/server/src/service/axum_websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,9 +818,9 @@ impl Message {
fn into_tungstenite(self) -> ts::Message {
match self {
Self::Text(text) => ts::Message::Text(text.into_tungstenite().to_string()), /* NOTARY_MODIFICATION */
Self::Binary(binary) => ts::Message::Binary(binary.to_vec()), // NOTARY_MODIFICATION
Self::Ping(ping) => ts::Message::Ping(ping.to_vec()), // NOTARY_MODIFICATION
Self::Pong(pong) => ts::Message::Pong(pong.to_vec()), // NOTARY_MODIFICATION
Self::Binary(binary) => ts::Message::Binary(binary.to_vec()), /* NOTARY_MODIFICATION */
Self::Ping(ping) => ts::Message::Ping(ping.to_vec()), /* NOTARY_MODIFICATION */
Self::Pong(pong) => ts::Message::Pong(pong.to_vec()), /* NOTARY_MODIFICATION */

Check warning on line 823 in crates/notary/server/src/service/axum_websocket.rs

View check run for this annotation

Codecov / codecov/patch

crates/notary/server/src/service/axum_websocket.rs#L820-L823

Added lines #L820 - L823 were not covered by tests
Self::Close(Some(close)) => ts::Message::Close(Some(ts::protocol::CloseFrame {
code: ts::protocol::frame::coding::CloseCode::from(close.code),
reason: Cow::Owned(close.reason.into_tungstenite().to_string()), /* NOTARY_MODIFICATION */

Check warning on line 826 in crates/notary/server/src/service/axum_websocket.rs

View check run for this annotation

Codecov / codecov/patch

crates/notary/server/src/service/axum_websocket.rs#L826

Added line #L826 was not covered by tests
Expand All @@ -833,11 +833,11 @@ impl Message {
match message {
ts::Message::Text(text) => Some(Self::Text(Utf8Bytes(text.into()))), /* NOTARY_MODIFICATION */
ts::Message::Binary(binary) => Some(Self::Binary(binary.into())), /* NOTARY_MODIFICATION */
ts::Message::Ping(ping) => Some(Self::Ping(ping.into())), // NOTARY_MODIFICATION
ts::Message::Pong(pong) => Some(Self::Pong(pong.into())), // NOTARY_MODIFICATION
ts::Message::Ping(ping) => Some(Self::Ping(ping.into())), /* NOTARY_MODIFICATION */
ts::Message::Pong(pong) => Some(Self::Pong(pong.into())), /* NOTARY_MODIFICATION */

Check warning on line 837 in crates/notary/server/src/service/axum_websocket.rs

View check run for this annotation

Codecov / codecov/patch

crates/notary/server/src/service/axum_websocket.rs#L834-L837

Added lines #L834 - L837 were not covered by tests
ts::Message::Close(Some(close)) => Some(Self::Close(Some(CloseFrame {
code: close.code.into(),
reason: Utf8Bytes(close.reason.to_string().into()), // NOTARY_MODIFICATION
reason: Utf8Bytes(close.reason.to_string().into()), /* NOTARY_MODIFICATION */

Check warning on line 840 in crates/notary/server/src/service/axum_websocket.rs

View check run for this annotation

Codecov / codecov/patch

crates/notary/server/src/service/axum_websocket.rs#L840

Added line #L840 was not covered by tests
}))),
ts::Message::Close(None) => Some(Self::Close(None)),
// we can ignore `Frame` frames as recommended by the tungstenite maintainers
Expand Down

0 comments on commit 541bcaf

Please sign in to comment.