diff --git a/entity/src/advisory.rs b/entity/src/advisory.rs index a09a454a2..84016a858 100644 --- a/entity/src/advisory.rs +++ b/entity/src/advisory.rs @@ -34,7 +34,7 @@ pub struct Model { #[ComplexObject] impl Model { - async fn organization<'a>(&self, ctx: &Context<'a>) -> Result { + async fn organization(&self, ctx: &Context<'_>) -> Result { let db = ctx.data::>()?; if let Some(found) = self .find_related(organization::Entity) @@ -47,7 +47,7 @@ impl Model { } } - async fn vulnerabilities<'a>(&self, ctx: &Context<'a>) -> Result> { + async fn vulnerabilities(&self, ctx: &Context<'_>) -> Result> { let db = ctx.data::>()?; Ok(self .find_related(vulnerability::Entity) diff --git a/modules/graphql/src/advisory.rs b/modules/graphql/src/advisory.rs index ff8941301..75f83be87 100644 --- a/modules/graphql/src/advisory.rs +++ b/modules/graphql/src/advisory.rs @@ -11,7 +11,7 @@ pub struct AdvisoryQuery; #[Object] impl AdvisoryQuery { - async fn get_advisory_by_id<'a>(&self, ctx: &Context<'a>, id: Uuid) -> FieldResult { + async fn get_advisory_by_id(&self, ctx: &Context<'_>, id: Uuid) -> FieldResult { let db = ctx.data::>()?; let graph = ctx.data::>()?; let advisory = graph.get_advisory_by_id(id, db.as_ref()).await; @@ -36,7 +36,7 @@ impl AdvisoryQuery { } } - async fn get_advisories<'a>(&self, ctx: &Context<'a>) -> FieldResult> { + async fn get_advisories(&self, ctx: &Context<'_>) -> FieldResult> { let db = ctx.data::>()?; let graph = ctx.data::>()?; diff --git a/modules/graphql/src/organization.rs b/modules/graphql/src/organization.rs index e528dd375..b5d6d78cc 100644 --- a/modules/graphql/src/organization.rs +++ b/modules/graphql/src/organization.rs @@ -9,9 +9,9 @@ pub struct OrganizationQuery; #[Object] impl OrganizationQuery { - async fn get_organization_by_name<'a>( + async fn get_organization_by_name( &self, - ctx: &Context<'a>, + ctx: &Context<'_>, name: String, ) -> FieldResult { let db = ctx.data::>()?; diff --git a/modules/graphql/src/sbom.rs b/modules/graphql/src/sbom.rs index 74badbcaf..a9940b557 100644 --- a/modules/graphql/src/sbom.rs +++ b/modules/graphql/src/sbom.rs @@ -10,7 +10,7 @@ pub struct SbomQuery; #[Object] impl SbomQuery { - async fn get_sbom_by_id<'a>(&self, ctx: &Context<'a>, id: Uuid) -> FieldResult { + async fn get_sbom_by_id(&self, ctx: &Context<'_>, id: Uuid) -> FieldResult { let db = ctx.data::>()?; let graph = ctx.data::>()?; let sbom = graph.locate_sbom_by_id(id, db.as_ref()).await; @@ -31,9 +31,9 @@ impl SbomQuery { } } - async fn get_sboms_by_labels<'a>( + async fn get_sboms_by_labels( &self, - ctx: &Context<'a>, + ctx: &Context<'_>, labels: String, ) -> FieldResult> { let db = ctx.data::>()?; diff --git a/modules/graphql/src/sbomstatus.rs b/modules/graphql/src/sbomstatus.rs index 7df0cd735..4dadacaca 100644 --- a/modules/graphql/src/sbomstatus.rs +++ b/modules/graphql/src/sbomstatus.rs @@ -21,9 +21,9 @@ pub struct SbomStatusQuery; #[Object] impl SbomStatusQuery { - async fn cves_by_sbom<'a>( + async fn cves_by_sbom( &self, - ctx: &Context<'a>, + ctx: &Context<'_>, id: Uuid, ) -> FieldResult> { let db = ctx.data::>()?; diff --git a/modules/graphql/src/vulnerability.rs b/modules/graphql/src/vulnerability.rs index 488c1de7a..c271e8523 100644 --- a/modules/graphql/src/vulnerability.rs +++ b/modules/graphql/src/vulnerability.rs @@ -9,9 +9,9 @@ pub struct VulnerabilityQuery; #[Object] impl VulnerabilityQuery { - async fn get_vulnerability_by_id<'a>( + async fn get_vulnerability_by_id( &self, - ctx: &Context<'a>, + ctx: &Context<'_>, identifier: String, ) -> FieldResult { let db = ctx.data::>()?; @@ -33,7 +33,7 @@ impl VulnerabilityQuery { } } - async fn get_vulnerabilities<'a>(&self, ctx: &Context<'a>) -> FieldResult> { + async fn get_vulnerabilities(&self, ctx: &Context<'_>) -> FieldResult> { let db = ctx.data::>()?; let graph = ctx.data::>()?; let vulnerabilities = graph diff --git a/modules/ingestor/src/graph/advisory/advisory_vulnerability.rs b/modules/ingestor/src/graph/advisory/advisory_vulnerability.rs index 8be4e0a25..767263bb0 100644 --- a/modules/ingestor/src/graph/advisory/advisory_vulnerability.rs +++ b/modules/ingestor/src/graph/advisory/advisory_vulnerability.rs @@ -133,7 +133,7 @@ impl<'g> From<(&AdvisoryContext<'g>, entity::advisory_vulnerability::Model)> } } -impl<'g> AdvisoryVulnerabilityContext<'g> { +impl AdvisoryVulnerabilityContext<'_> { pub async fn vulnerability( &self, connection: &C, diff --git a/modules/ingestor/src/service/format.rs b/modules/ingestor/src/service/format.rs index b83364296..2e27c0db7 100644 --- a/modules/ingestor/src/service/format.rs +++ b/modules/ingestor/src/service/format.rs @@ -39,11 +39,11 @@ pub enum Format { Unknown, } -impl<'g> Format { +impl Format { #[instrument(skip(self, graph, buffer))] pub async fn load( &self, - graph: &'g Graph, + graph: &'_ Graph, labels: Labels, issuer: Option, digests: &Digests, diff --git a/modules/ingestor/tests/reingest/spdx.rs b/modules/ingestor/tests/reingest/spdx.rs index eda88774f..04cd29558 100644 --- a/modules/ingestor/tests/reingest/spdx.rs +++ b/modules/ingestor/tests/reingest/spdx.rs @@ -8,6 +8,7 @@ use trustify_common::{cpe::Cpe, id::Id}; use trustify_entity::{cpe::CpeDto, sbom}; use trustify_module_ingestor::model::IngestResult; use trustify_test_context::TrustifyContext; +use uuid::Uuid; #[test_context(TrustifyContext)] #[test(tokio::test)] @@ -41,7 +42,7 @@ async fn reingest(ctx: &TrustifyContext) -> Result<(), anyhow::Error> { .into_iter() .map(|purl| purl.qualified_package.id) .collect::>(), - vec![] + Vec::::new() ); // get product diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c6d8cdf27..a6cb31813 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.83.0" +channel = "1.84.0" components = [ "rustfmt", "clippy" ]