1- use std:: path:: PathBuf ;
2- use std:: io:: { Read , Write } ;
3- use serde:: { Deserialize , Serialize } ;
41use crate :: error:: { OpenCliError , Result } ;
2+ use serde:: { Deserialize , Serialize } ;
3+ use std:: io:: { Read , Write } ;
4+ use std:: path:: PathBuf ;
55
66#[ cfg( unix) ]
77use std:: os:: unix:: net:: UnixStream ;
@@ -36,8 +36,8 @@ impl IpcClient {
3636 pub fn connect ( ) -> Result < Self > {
3737 #[ cfg( unix) ]
3838 {
39- let stream = UnixStream :: connect ( SOCKET_PATH )
40- . map_err ( |_| OpenCliError :: DaemonNotRunning ) ?;
39+ let stream =
40+ UnixStream :: connect ( SOCKET_PATH ) . map_err ( |_| OpenCliError :: DaemonNotRunning ) ?;
4141
4242 Ok ( Self { stream } )
4343 }
@@ -83,7 +83,9 @@ impl IpcClient {
8383
8484 if !response. success {
8585 return Err ( OpenCliError :: RequestFailed (
86- response. error . unwrap_or_else ( || "Unknown error" . to_string ( ) )
86+ response
87+ . error
88+ . unwrap_or_else ( || "Unknown error" . to_string ( ) ) ,
8789 ) ) ;
8890 }
8991
@@ -94,7 +96,7 @@ impl IpcClient {
9496 {
9597 // Windows named pipe implementation coming soon
9698 Err ( OpenCliError :: RequestFailed (
97- "Windows IPC support is not yet implemented" . to_string ( )
99+ "Windows IPC support is not yet implemented" . to_string ( ) ,
98100 ) )
99101 }
100102 }
0 commit comments