Format Rust code using rustfmt

This commit is contained in:
github-actions[bot] 2023-10-08 04:57:28 +00:00 committed by GitHub
parent 028acd66ef
commit a8f2921340
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 8 deletions

View File

@ -354,7 +354,8 @@ impl UqProcessImports for ProcessWasi {
}, },
None, None,
) )
.await else { .await
else {
return Ok(Err(wit::SpawnError::NoFileAtPath)); return Ok(Err(wit::SpawnError::NoFileAtPath));
}; };
let wit::Message::Response((wit::Response { ipc: Some(ipc), .. }, _)) = hash_response let wit::Message::Response((wit::Response { ipc: Some(ipc), .. }, _)) = hash_response
@ -383,7 +384,8 @@ impl UqProcessImports for ProcessWasi {
}, },
None, None,
) )
.await else { .await
else {
return Ok(Err(wit::SpawnError::NoFileAtPath)); return Ok(Err(wit::SpawnError::NoFileAtPath));
}; };
@ -462,7 +464,9 @@ impl UqProcessImports for ProcessWasi {
mime: None, mime: None,
bytes: bytes.to_vec(), bytes: bytes.to_vec(),
}), }),
).await else { )
.await
else {
return Ok(Err(wit::SpawnError::NameTaken)); return Ok(Err(wit::SpawnError::NameTaken));
}; };

View File

@ -1,3 +1,4 @@
use crate::types::*;
use anyhow::Result; use anyhow::Result;
use crossterm::{ use crossterm::{
cursor, cursor,
@ -13,7 +14,6 @@ use futures::{future::FutureExt, StreamExt};
use std::collections::VecDeque; use std::collections::VecDeque;
use std::fs::{read_to_string, File, OpenOptions}; use std::fs::{read_to_string, File, OpenOptions};
use std::io::{stdout, BufWriter, Write}; use std::io::{stdout, BufWriter, Write};
use crate::types::*;
#[derive(Debug)] #[derive(Debug)]
struct CommandHistory { struct CommandHistory {

View File

@ -149,8 +149,7 @@ async fn persist_state(our_node: String, send_to_loop: &MessageSender, state: &I
inherit: true, inherit: true,
expects_response: Some(5), // TODO evaluate expects_response: Some(5), // TODO evaluate
ipc: Some( ipc: Some(
serde_json::to_string(&FsAction::SetState(VFS_PROCESS_ID.clone())) serde_json::to_string(&FsAction::SetState(VFS_PROCESS_ID.clone())).unwrap(),
.unwrap(),
), ),
metadata: None, metadata: None,
}), }),
@ -186,8 +185,7 @@ async fn load_state_from_reboot(
inherit: true, inherit: true,
expects_response: Some(5), // TODO evaluate expects_response: Some(5), // TODO evaluate
ipc: Some( ipc: Some(
serde_json::to_string(&FsAction::GetState(VFS_PROCESS_ID.clone())) serde_json::to_string(&FsAction::GetState(VFS_PROCESS_ID.clone())).unwrap(),
.unwrap(),
), ),
metadata: None, metadata: None,
}), }),