From 76afb94f63a6a8fcee1f14dbd3ccbf391582f546 Mon Sep 17 00:00:00 2001 From: pjht Date: Tue, 6 Aug 2024 19:41:31 -0500 Subject: [PATCH] Format --- devfs_rpc/src/lib.rs | 3 ++- src/main.rs | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/devfs_rpc/src/lib.rs b/devfs_rpc/src/lib.rs index e813104..a7bb74c 100644 --- a/devfs_rpc/src/lib.rs +++ b/devfs_rpc/src/lib.rs @@ -1,7 +1,8 @@ #![allow(clippy::result_unit_err)] use std::{ - os::mikros::ipc::rpc::{self, IncomingCall}, path::Path, + os::mikros::ipc::rpc::{self, IncomingCall}, + path::Path, }; use parking_lot::RwLock; diff --git a/src/main.rs b/src/main.rs index 53e5499..26480b1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,8 @@ -use std::{collections::HashMap, os::mikros::{ipc, syscalls}, sync::Arc}; +use std::{ + collections::HashMap, + os::mikros::{ipc, syscalls}, + sync::Arc, +}; use parking_lot::RwLock; @@ -24,12 +28,14 @@ impl fs_rpc::Server for Serv { impl devfs_rpc::Server for Serv { fn register_dev(&self, from: u64, name: &str) -> Result<(), ()> { self.devices.write().insert(name.to_owned(), from); - self.syslog_client.send_text_binary_message( - "devfs", - format!("PID {} registered device {}", from, name), - 1, - name.as_bytes().to_vec() - ).unwrap(); + self.syslog_client + .send_text_binary_message( + "devfs", + format!("PID {} registered device {}", from, name), + 1, + name.as_bytes().to_vec(), + ) + .unwrap(); Ok(()) } } @@ -58,7 +64,9 @@ fn main() { } vfs_rpc::Client::new(vfs_pid).register_fs("devfs").unwrap(); syscalls::register(1); - syslog_client.send_text_binary_message("devfs", "Devfs initialized", 0, &[]).unwrap(); + syslog_client + .send_text_binary_message("devfs", "Devfs initialized", 0, []) + .unwrap(); loop { ipc::process_messages() }