Skip to content

Commit b4249f6

Browse files
committed
clippy
1 parent 50a9a81 commit b4249f6

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

tools/pubsys/src/aws/validate_ami/results.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ mod test {
210210
(Region::new("us-west-2"), HashSet::from([])),
211211
(Region::new("us-east-1"), HashSet::from([])),
212212
]));
213-
let results_filtered = results.get_results_for_status(&vec![
213+
let results_filtered = results.get_results_for_status(&[
214214
AmiValidationResultStatus::Correct,
215215
AmiValidationResultStatus::Incorrect,
216216
AmiValidationResultStatus::Missing,
@@ -355,7 +355,7 @@ mod test {
355355
),
356356
]));
357357
let results_filtered =
358-
results.get_results_for_status(&vec![AmiValidationResultStatus::Correct]);
358+
results.get_results_for_status(&[AmiValidationResultStatus::Correct]);
359359

360360
assert_eq!(
361361
results_filtered,
@@ -525,7 +525,7 @@ mod test {
525525
]),
526526
),
527527
]));
528-
let results_filtered = results.get_results_for_status(&vec![
528+
let results_filtered = results.get_results_for_status(&[
529529
AmiValidationResultStatus::Correct,
530530
AmiValidationResultStatus::Incorrect,
531531
]);
@@ -756,7 +756,7 @@ mod test {
756756
)]),
757757
),
758758
]));
759-
let results_filtered = results.get_results_for_status(&vec![
759+
let results_filtered = results.get_results_for_status(&[
760760
AmiValidationResultStatus::Correct,
761761
AmiValidationResultStatus::Incorrect,
762762
AmiValidationResultStatus::Missing,
@@ -1027,7 +1027,7 @@ mod test {
10271027
),
10281028
]));
10291029
let results_filtered =
1030-
results.get_results_for_status(&vec![AmiValidationResultStatus::Missing]);
1030+
results.get_results_for_status(&[AmiValidationResultStatus::Missing]);
10311031

10321032
assert_eq!(results_filtered, HashSet::new());
10331033
}

tools/pubsys/src/repo.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,10 @@ mod error {
821821
},
822822

823823
#[snafu(display("Error reading bytes from stream: {}", source))]
824-
Stream { source: tough::error::Error },
824+
Stream {
825+
#[snafu(source(from(tough::error::Error, Box::new)))]
826+
source: Box<tough::error::Error>,
827+
},
825828

826829
#[snafu(display("Failed to create temporary file: {}", source))]
827830
TempFile { source: io::Error },

tools/pubsys/src/repo/validate_repo/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async fn retrieve_targets(repo: &Repository) -> Result<(), Error> {
5353
}
5454

5555
async fn download_target(repo: &Repository, target: &TargetName) -> Result<u64, Error> {
56-
let stream = match repo.read_target(&target).await {
56+
let stream = match repo.read_target(target).await {
5757
Ok(Some(stream)) => stream,
5858
Ok(None) => {
5959
return error::TargetMissingSnafu {

twoliter/src/project.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ mod test {
236236
let deserialized = Project::load(path).await.unwrap();
237237

238238
// Add checks here as desired to validate deserialization.
239-
assert_eq!(SchemaVersion::<1>::default(), deserialized.schema_version);
239+
assert_eq!(SchemaVersion::<1>, deserialized.schema_version);
240240
let sdk_name = deserialized.sdk_name().unwrap();
241241
let toolchain_name = deserialized.toolchain_name().unwrap();
242242
assert_eq!("a.com/b", sdk_name.registry.as_ref().unwrap().as_str());

0 commit comments

Comments
 (0)