mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-29 19:41:39 +03:00
Format Rust code using rustfmt
This commit is contained in:
parent
5b35a9b29b
commit
3ba6d427fd
3
build.rs
3
build.rs
@ -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);
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user