diff --git a/src/commander.rs b/src/commander.rs index 2f8df1d..be2aa76 100644 --- a/src/commander.rs +++ b/src/commander.rs @@ -44,7 +44,7 @@ impl Commander { match stream { Ok(mut stream) => { if let Err(e) = self.run_cycle(&mut stream) { - error(format!("{e}")) + error(e) } } Err(e) => error(format!("Connection for {:?} failed: {e}", &self.socket_path)), diff --git a/src/server.rs b/src/server.rs index 467513a..bebd355 100644 --- a/src/server.rs +++ b/src/server.rs @@ -73,8 +73,8 @@ impl Server { let pid = std::process::id().to_string(); let socket = match env::var("LISTEN_PID") { Ok(listen_pid) if listen_pid == pid => { - info(format!( - "env var LISTEN_PID was set to our PID, creating socket from raw fd ..." + info(String::from( + "env var LISTEN_PID was set to our PID, creating socket from raw fd ...", )); let fd: RawFd = 3; unsafe { UdpSocket::from_raw_fd(fd) } @@ -205,7 +205,7 @@ impl Server { fn send_command(&self, data: CommanderData) { match self.write_to_socket(data) { - Ok(_) => info(format!("Successfully sent data to commander")), + Ok(_) => info("Successfully sent data to commander".to_string()), Err(e) => error(format!( "Could not send data to commander via socket {:?}: {e}", &self.socket_path