diff --git a/tools/pubsys/src/aws/validate_ami/results.rs b/tools/pubsys/src/aws/validate_ami/results.rs index 698fbe01a..45a601dbb 100644 --- a/tools/pubsys/src/aws/validate_ami/results.rs +++ b/tools/pubsys/src/aws/validate_ami/results.rs @@ -210,7 +210,7 @@ mod test { (Region::new("us-west-2"), HashSet::from([])), (Region::new("us-east-1"), HashSet::from([])), ])); - let results_filtered = results.get_results_for_status(&vec![ + let results_filtered = results.get_results_for_status(&[ AmiValidationResultStatus::Correct, AmiValidationResultStatus::Incorrect, AmiValidationResultStatus::Missing, @@ -355,7 +355,7 @@ mod test { ), ])); let results_filtered = - results.get_results_for_status(&vec![AmiValidationResultStatus::Correct]); + results.get_results_for_status(&[AmiValidationResultStatus::Correct]); assert_eq!( results_filtered, @@ -525,7 +525,7 @@ mod test { ]), ), ])); - let results_filtered = results.get_results_for_status(&vec![ + let results_filtered = results.get_results_for_status(&[ AmiValidationResultStatus::Correct, AmiValidationResultStatus::Incorrect, ]); @@ -756,7 +756,7 @@ mod test { )]), ), ])); - let results_filtered = results.get_results_for_status(&vec![ + let results_filtered = results.get_results_for_status(&[ AmiValidationResultStatus::Correct, AmiValidationResultStatus::Incorrect, AmiValidationResultStatus::Missing, @@ -1027,7 +1027,7 @@ mod test { ), ])); let results_filtered = - results.get_results_for_status(&vec![AmiValidationResultStatus::Missing]); + results.get_results_for_status(&[AmiValidationResultStatus::Missing]); assert_eq!(results_filtered, HashSet::new()); } diff --git a/tools/pubsys/src/repo.rs b/tools/pubsys/src/repo.rs index 74be84d1b..f117e6394 100644 --- a/tools/pubsys/src/repo.rs +++ b/tools/pubsys/src/repo.rs @@ -821,7 +821,10 @@ mod error { }, #[snafu(display("Error reading bytes from stream: {}", source))] - Stream { source: tough::error::Error }, + Stream { + #[snafu(source(from(tough::error::Error, Box::new)))] + source: Box, + }, #[snafu(display("Failed to create temporary file: {}", source))] TempFile { source: io::Error }, diff --git a/tools/pubsys/src/repo/validate_repo/mod.rs b/tools/pubsys/src/repo/validate_repo/mod.rs index ed3377f01..b27107911 100644 --- a/tools/pubsys/src/repo/validate_repo/mod.rs +++ b/tools/pubsys/src/repo/validate_repo/mod.rs @@ -53,7 +53,7 @@ async fn retrieve_targets(repo: &Repository) -> Result<(), Error> { } async fn download_target(repo: &Repository, target: &TargetName) -> Result { - let stream = match repo.read_target(&target).await { + let stream = match repo.read_target(target).await { Ok(Some(stream)) => stream, Ok(None) => { return error::TargetMissingSnafu { diff --git a/twoliter/src/project.rs b/twoliter/src/project.rs index bee333675..31880b418 100644 --- a/twoliter/src/project.rs +++ b/twoliter/src/project.rs @@ -236,7 +236,7 @@ mod test { let deserialized = Project::load(path).await.unwrap(); // Add checks here as desired to validate deserialization. - assert_eq!(SchemaVersion::<1>::default(), deserialized.schema_version); + assert_eq!(SchemaVersion::<1>, deserialized.schema_version); let sdk_name = deserialized.sdk_name().unwrap(); let toolchain_name = deserialized.toolchain_name().unwrap(); assert_eq!("a.com/b", sdk_name.registry.as_ref().unwrap().as_str());