5
0
mirror of git://git.proxmox.com/git/pxar.git synced 2025-01-08 01:17:40 +03:00

formatting fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-06-25 13:56:48 +02:00
parent 139932923c
commit 8fe6038295
2 changed files with 5 additions and 6 deletions

View File

@ -86,6 +86,7 @@ impl Entry {
}
}
#[rustfmt::skip]
pub fn test_fs() -> Entry {
Entry::new("/")
.metadata(Metadata::dir_builder(0o755))

View File

@ -26,14 +26,12 @@ fn test1() {
let mut file = Vec::<u8>::new();
let test_fs = fs::test_fs();
let mut encoder = encoder::Encoder::from_std(&mut file, &test_fs.metadata)
.expect("failed to create encoder");
encode_directory(&mut encoder, &test_fs)
.expect("failed to encode test file system");
let mut encoder =
encoder::Encoder::from_std(&mut file, &test_fs.metadata).expect("failed to create encoder");
encode_directory(&mut encoder, &test_fs).expect("failed to encode test file system");
encoder.finish();
assert!(!file.is_empty(), "encoder did not write any data");
let mut decoder = decoder::Decoder::from_std(&mut &file[..])
.expect("failed to create decoder");
let mut decoder = decoder::Decoder::from_std(&mut &file[..]).expect("failed to create decoder");
}