(path: &str, expected: Option<&str>, actual: &str)
| 83 | } |
| 84 | |
| 85 | fn require_revision(path: &str, expected: Option<&str>, actual: &str) -> CliResult<()> { |
| 86 | match expected { |
| 87 | Some(expected) if !expected.eq_ignore_ascii_case(actual) => { |
| 88 | return Err(CliError::InvalidArgument { |
| 89 | message: format!( |
| 90 | "Vault entry revision changed for {path}: expected {expected}, found {actual}" |
| 91 | ), |
| 92 | }); |
| 93 | } |
| 94 | _ => {} |
| 95 | } |
| 96 | Ok(()) |
| 97 | } |
| 98 | |
| 99 | fn entry_json(path: &str, entry: &VaultEntry, revision_hash: &str) -> serde_json::Value { |
| 100 | serde_json::json!({ |
no outgoing calls