Skip to content

Commit 5fc9236

Browse files
authored
Merge branch 'main' into layered-connect-handler
2 parents 1f05e70 + 39d700a commit 5fc9236

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

socketioxide/src/handler/extract.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ impl<A: Adapter> From<Arc<Socket<A>>> for SocketRef<A> {
227227
}
228228
}
229229

230+
impl<A: Adapter> Clone for SocketRef<A> {
231+
fn clone(&self) -> Self {
232+
Self(self.0.clone())
233+
}
234+
}
235+
230236
impl<A: Adapter> SocketRef<A> {
231237
/// Disconnect the socket from the current namespace,
232238
///
@@ -378,7 +384,7 @@ mod state_extract {
378384

379385
/// An Extractor that contains a reference to a state previously set with [`SocketIoBuilder::with_state`](crate::io::SocketIoBuilder).
380386
/// It implements [`std::ops::Deref`] to access the inner type so you can use it as a normal reference.
381-
///
387+
///
382388
/// The specified state type must be the same as the one set with [`SocketIoBuilder::with_state`](crate::io::SocketIoBuilder).
383389
/// If it is not the case, the handler won't be called and an error log will be print if the `tracing` feature is enabled.
384390
///

0 commit comments

Comments
 (0)