Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
beac0n committed Aug 22, 2024
1 parent 552a840 commit 885b8a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commander.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
6 changes: 3 additions & 3 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 885b8a5

Please sign in to comment.