Skip to content

Commit 7184b64

Browse files
cargo fmt
1 parent 313771e commit 7184b64

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

crates/wasi-vfs-cli/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fn is_wasi_reactor(bytes: &[u8]) -> bool {
9595
return false;
9696
}
9797
wasmparser::Payload::End(_) => return false,
98-
_ => continue
98+
_ => continue,
9999
}
100100
}
101101
false

src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ mod wasi_snapshot_preview1;
1010
use embed::LinkedStorage as DefaultStorage;
1111
use embed::{EmbeddedFs, NodeIdTrait, Storage};
1212

13-
use std::{collections::HashMap, ffi::{CStr, CString}};
13+
use std::{
14+
collections::HashMap,
15+
ffi::{CStr, CString},
16+
};
1417
use wasi::Fd;
1518

1619
/// User-facing file descriptor managed by wasi-vfs
@@ -63,11 +66,12 @@ impl<S: Storage> FileSystem<S> {
6366
};
6467

6568
let mut prefix = Vec::with_capacity(prestat.u.dir.pr_name_len + 1);
66-
match wasi::fd_prestat_dir_name(fd, prefix.as_mut_ptr(), prestat.u.dir.pr_name_len) {
69+
match wasi::fd_prestat_dir_name(fd, prefix.as_mut_ptr(), prestat.u.dir.pr_name_len)
70+
{
6771
Ok(_) => {
6872
prefix.set_len(prestat.u.dir.pr_name_len + 1);
6973
prefix[prestat.u.dir.pr_name_len] = 0;
70-
},
74+
}
7175
Err(other) => {
7276
panic!("failed to get prestat dir name: {}", other);
7377
}

0 commit comments

Comments
 (0)