Skip to content

Commit 3ab5fd0

Browse files
committed
refactor: Update example usage in IPC server documentation for clarity
1 parent 24db8e1 commit 3ab5fd0

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@
126126
"FIXME",
127127
"HACK",
128128
"XXX",
129-
"RUSTSEC"
129+
"RUSTSEC",
130+
"widestring",
131+
"sddl"
130132
],
131133
"patterns": [
132134
{

src/ipc_http_server.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,9 @@ impl IpcHttpServer {
512512
///
513513
/// # Example
514514
/// ```rust
515-
/// server = server.with_listener_mode(0o660); // Only owner and group can read/write
515+
/// use kode_bridge::IpcHttpServer;
516+
///
517+
/// let server = IpcHttpServer::new("/tmp/my.sock").unwrap().with_listener_mode(0o660); // Only owner and group can read/write
516518
/// ```
517519
#[cfg(unix)]
518520
pub fn with_listener_mode(mut self, mode: u16) -> Self {

src/ipc_stream_server.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,9 @@ impl IpcStreamServer {
421421
///
422422
/// # Example
423423
/// ```rust
424-
/// server = server.with_listener_mode(0o660); // Only owner and group can read/write
424+
/// use kode_bridge::IpcStreamServer;
425+
///
426+
/// let server = IpcStreamServer::new("/tmp/my.sock").unwrap().with_listener_mode(0o660); // Only owner and group can read/write
425427
/// ```
426428
#[cfg(unix)]
427429
pub fn with_listener_mode(mut self, mode: u16) -> Self {

0 commit comments

Comments
 (0)