Fix Clippy issues

This commit is contained in:
Luc Perkins 2023-05-19 17:14:24 +02:00
parent 346fb35a7d
commit 8e40c0f8f3
No known key found for this signature in database
GPG Key ID: 4F102D0C16E232F2

View File

@ -101,7 +101,7 @@ fn check_for_non_allowed_refs(nodes: &HashMap<String, Node>, config: &Config) {
for (name, dep) in nixpkgs_deps { for (name, dep) in nixpkgs_deps {
if let Some(original) = &dep.original { if let Some(original) = &dep.original {
if let Some(ref git_ref) = original.r#ref { if let Some(ref git_ref) = original.r#ref {
if !config.allowed_refs.contains(&git_ref) { if !config.allowed_refs.contains(git_ref) {
println!( println!(
"dependency {} has a Git ref of {} which is not explicitly allowed", "dependency {} has a Git ref of {} which is not explicitly allowed",
name, git_ref name, git_ref
@ -132,7 +132,7 @@ fn main() -> Result<(), Error> {
let config_file = include_str!("policy.json"); let config_file = include_str!("policy.json");
let config: Config = let config: Config =
serde_json::from_str(&config_file).expect("inline policy.json file is malformed"); serde_json::from_str(config_file).expect("inline policy.json file is malformed");
check_flake_lock(&flake_lock, &config); check_flake_lock(&flake_lock, &config);