Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
webern committed Oct 6, 2023
1 parent 50a9a81 commit b4249f6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
10 changes: 5 additions & 5 deletions tools/pubsys/src/aws/validate_ami/results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
]);
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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());
}
Expand Down
5 changes: 4 additions & 1 deletion tools/pubsys/src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<tough::error::Error>,
},

#[snafu(display("Failed to create temporary file: {}", source))]
TempFile { source: io::Error },
Expand Down
2 changes: 1 addition & 1 deletion tools/pubsys/src/repo/validate_repo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async fn retrieve_targets(repo: &Repository) -> Result<(), Error> {
}

async fn download_target(repo: &Repository, target: &TargetName) -> Result<u64, Error> {
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 {
Expand Down
2 changes: 1 addition & 1 deletion twoliter/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit b4249f6

Please sign in to comment.