Format Rust code using rustfmt

This commit is contained in:
github-actions[bot] 2023-10-06 04:13:03 +00:00 committed by GitHub
parent 5b35a9b29b
commit 3ba6d427fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -148,7 +148,8 @@ fn main() {
])) ]))
.unwrap(); .unwrap();
// from the pkg folder, create a zip archive and save in target directory // from the pkg folder, create a zip archive and save in target directory
let writer = std::fs::File::create(format!("{}/target/{}.zip", pwd.display(), name)).unwrap(); let writer =
std::fs::File::create(format!("{}/target/{}.zip", pwd.display(), name)).unwrap();
let options = zip::write::FileOptions::default() let options = zip::write::FileOptions::default()
.compression_method(zip::CompressionMethod::Stored) // or CompressionMethod::Deflated .compression_method(zip::CompressionMethod::Stored) // or CompressionMethod::Deflated
.unix_permissions(0o755); .unix_permissions(0o755);

View File

@ -232,7 +232,10 @@ async fn bootstrap(
// get and read manifest.json // get and read manifest.json
let Ok(mut package_manifest_zip) = package.by_name("manifest.json") else { let Ok(mut package_manifest_zip) = package.by_name("manifest.json") else {
println!("fs: missing manifest for package {}, skipping", package_name); println!(
"fs: missing manifest for package {}, skipping",
package_name
);
continue; continue;
}; };
let mut manifest_content = Vec::new(); let mut manifest_content = Vec::new();
@ -307,7 +310,7 @@ async fn bootstrap(
// grant queued capabilities from all packages // grant queued capabilities from all packages
for (to, cap) in caps_to_grant { for (to, cap) in caps_to_grant {
let Some(proc) = process_map.get_mut(&to) else { let Some(proc) = process_map.get_mut(&to) else {
continue continue;
}; };
proc.capabilities.insert(cap); proc.capabilities.insert(cap);
} }
@ -692,10 +695,7 @@ async fn handle_request(
None, None,
)), )),
payload: match bytes { payload: match bytes {
Some(bytes) => Some(Payload { Some(bytes) => Some(Payload { mime: None, bytes }),
mime: None,
bytes,
}),
None => None, None => None,
}, },
signed_capabilities: None, signed_capabilities: None,