Parse policy.json using expect rather than error handling

This commit is contained in:
Luc Perkins 2023-05-19 16:14:53 +02:00
parent 29b0714683
commit 8fb55cded8
No known key found for this signature in database
GPG Key ID: 4F102D0C16E232F2

View File

@ -123,7 +123,8 @@ fn main() -> Result<(), Error> {
let flake_lock: FlakeLock = serde_json::from_str(&flake_lock_file)?;
let config_file = include_str!("policy.json");
let config: Config = serde_json::from_str(&config_file)?;
let config: Config =
serde_json::from_str(&config_file).expect("inline policy.json file is malformed");
check_flake_lock(&flake_lock, &config);