From 1620538e46e3b99da48088e24cde536b79573f73 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 17:42:51 +0000 Subject: [PATCH] Format Rust code using rustfmt --- src/filesystem/mod.rs | 24 +++++++++++++++++++----- src/main.rs | 2 +- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/filesystem/mod.rs b/src/filesystem/mod.rs index 4a8b3b80..3288fe10 100644 --- a/src/filesystem/mod.rs +++ b/src/filesystem/mod.rs @@ -19,7 +19,9 @@ pub async fn load_fs( // load/create fs directory, manifest + log if none. let fs_directory_path_str = format!("{}/fs", &home_directory_path); - let new_boot = create_dir_if_dne(&fs_directory_path_str).await.expect("failed creating fs dir!"); + let new_boot = create_dir_if_dne(&fs_directory_path_str) + .await + .expect("failed creating fs dir!"); let fs_directory_path: std::path::PathBuf = fs::canonicalize(fs_directory_path_str).await.unwrap(); @@ -73,15 +75,27 @@ pub async fn load_fs( if new_boot { // bootstrap filesystem - let _ = bootstrap(&our_name, &kernel_process_id, &mut process_map, &mut manifest).await.expect("fresh bootstrap failed!"); + let _ = bootstrap( + &our_name, + &kernel_process_id, + &mut process_map, + &mut manifest, + ) + .await + .expect("fresh bootstrap failed!"); } Ok((process_map, manifest)) } -// function run only upon fresh boot. -// goes through /modules, gets their .wasm bytes, injects into fs and kernel state. -async fn bootstrap(our_name: &str, kernel_process_id: &FileIdentifier, process_map: &mut ProcessMap, manifest: &mut Manifest) -> Result<()> { +// function run only upon fresh boot. +// goes through /modules, gets their .wasm bytes, injects into fs and kernel state. +async fn bootstrap( + our_name: &str, + kernel_process_id: &FileIdentifier, + process_map: &mut ProcessMap, + manifest: &mut Manifest, +) -> Result<()> { let names_and_bytes = get_processes_from_directories().await; const RUNTIME_MODULES: [&str; 8] = [ "filesystem", diff --git a/src/main.rs b/src/main.rs index f6ad2361..fbc20568 100644 --- a/src/main.rs +++ b/src/main.rs @@ -188,7 +188,7 @@ async fn main() { let http_server_port = http_server::find_open_port(8080).await.unwrap(); let (kill_tx, kill_rx) = oneshot::channel::(); let keyfile = fs::read(format!("{}/.keys", home_directory_path)).await; - + let (our, networking_keypair, jwt_secret_bytes, file_key): ( Identity, signature::Ed25519KeyPair,