From 6ae3fd7c3e3aaac3955a680133648d43da739161 Mon Sep 17 00:00:00 2001 From: Milan Stastny Date: Sun, 13 Nov 2022 10:43:18 +0100 Subject: [PATCH 1/3] Rename the file to match mod.rs, fixes #18 --- .../yew-hooks/src/hooks/{use_web_socket.rs => use_websocket.rs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename crates/yew-hooks/src/hooks/{use_web_socket.rs => use_websocket.rs} (100%) diff --git a/crates/yew-hooks/src/hooks/use_web_socket.rs b/crates/yew-hooks/src/hooks/use_websocket.rs similarity index 100% rename from crates/yew-hooks/src/hooks/use_web_socket.rs rename to crates/yew-hooks/src/hooks/use_websocket.rs From 077fedb95940813105b4ab463da2260ab9dcc9af Mon Sep 17 00:00:00 2001 From: Milan Stastny Date: Sun, 13 Nov 2022 10:47:34 +0100 Subject: [PATCH 2/3] Rename additional case --- .../src/routes/hooks/{use_web_socket.rs => use_websocket.rs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/yew-app/src/routes/hooks/{use_web_socket.rs => use_websocket.rs} (100%) diff --git a/examples/yew-app/src/routes/hooks/use_web_socket.rs b/examples/yew-app/src/routes/hooks/use_websocket.rs similarity index 100% rename from examples/yew-app/src/routes/hooks/use_web_socket.rs rename to examples/yew-app/src/routes/hooks/use_websocket.rs From 261d17cd2bf78a2fc8eb3722dae7ca0fa2964dda Mon Sep 17 00:00:00 2001 From: Milan Stastny Date: Sun, 13 Nov 2022 10:52:28 +0100 Subject: [PATCH 3/3] Fix fmt --- crates/yew-hooks/src/hooks/use_websocket.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/yew-hooks/src/hooks/use_websocket.rs b/crates/yew-hooks/src/hooks/use_websocket.rs index 48c0477..b7e1a59 100644 --- a/crates/yew-hooks/src/hooks/use_websocket.rs +++ b/crates/yew-hooks/src/hooks/use_websocket.rs @@ -224,10 +224,7 @@ pub fn use_websocket(url: String) -> UseWebSocketHandle { /// } /// ``` #[hook] -pub fn use_websocket_with_options( - url: String, - options: UseWebSocketOptions, -) -> UseWebSocketHandle { +pub fn use_websocket_with_options(url: String, options: UseWebSocketOptions) -> UseWebSocketHandle { let ready_state = use_state(|| UseWebSocketReadyState::Closed); let message = use_state_ptr_eq(|| None); let message_bytes = use_state_ptr_eq(|| None);