(root: &Path, path: &str, bytes: &[u8])
| 25 | pub public_key: Vec<u8>, |
| 26 | } |
| 27 | fn write(root: &Path, path: &str, bytes: &[u8]) -> Result<()> { |
| 28 | let path = root.join(path); |
| 29 | fs::create_dir_all(path.parent().unwrap())?; |
| 30 | fs::write(path, bytes)?; |
| 31 | Ok(()) |
| 32 | } |
| 33 | fn source_hash(fm: &Map<String, Value>, body: &str) -> String { |
| 34 | let mut h = blake3::Hasher::new(); |
| 35 | h.update(serde_json::to_string(fm).unwrap().as_bytes()); |