Skip to content

Commit 245ca62

Browse files
committed
docs: fix refs in test
1 parent c7365b3 commit 245ca62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

msg-socket/src/hooks/token.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! // Server side - validates incoming tokens
1919
//! let rep = RepSocket::new(Tcp::default()).with_connection_hook(ServerHook::new(|token| {
2020
//! // Custom validation logic
21-
//! token == b"secret"
21+
//! **token == *b"secret"
2222
//! }));
2323
//!
2424
//! // Client side - sends token on connect
@@ -78,7 +78,7 @@ pub enum ClientHookError {
7878
/// let hook = ServerHook::accept_all();
7979
///
8080
/// // Custom validation
81-
/// let hook = ServerHook::new(|token| token == b"my_secret_token");
81+
/// let hook = ServerHook::new(|token| **token == *b"my_secret_token");
8282
/// ```
8383
pub struct ServerHook<F> {
8484
validator: F,

0 commit comments

Comments
 (0)