Skip to content

Commit

Permalink
chore: update Rust to 1.84
Browse files Browse the repository at this point in the history
This is required be dependencies.
  • Loading branch information
ctron committed Jan 23, 2025
1 parent cb1303b commit aedb97e
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions entity/src/advisory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct Model {

#[ComplexObject]
impl Model {
async fn organization<'a>(&self, ctx: &Context<'a>) -> Result<organization::Model> {
async fn organization(&self, ctx: &Context<'_>) -> Result<organization::Model> {
let db = ctx.data::<Arc<db::Database>>()?;
if let Some(found) = self
.find_related(organization::Entity)
Expand All @@ -47,7 +47,7 @@ impl Model {
}
}

async fn vulnerabilities<'a>(&self, ctx: &Context<'a>) -> Result<Vec<vulnerability::Model>> {
async fn vulnerabilities(&self, ctx: &Context<'_>) -> Result<Vec<vulnerability::Model>> {
let db = ctx.data::<Arc<db::Database>>()?;
Ok(self
.find_related(vulnerability::Entity)
Expand Down
4 changes: 2 additions & 2 deletions modules/graphql/src/advisory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub struct AdvisoryQuery;

#[Object]
impl AdvisoryQuery {
async fn get_advisory_by_id<'a>(&self, ctx: &Context<'a>, id: Uuid) -> FieldResult<Advisory> {
async fn get_advisory_by_id(&self, ctx: &Context<'_>, id: Uuid) -> FieldResult<Advisory> {
let db = ctx.data::<Arc<Database>>()?;
let graph = ctx.data::<Arc<Graph>>()?;
let advisory = graph.get_advisory_by_id(id, db.as_ref()).await;
Expand All @@ -36,7 +36,7 @@ impl AdvisoryQuery {
}
}

async fn get_advisories<'a>(&self, ctx: &Context<'a>) -> FieldResult<Vec<Advisory>> {
async fn get_advisories(&self, ctx: &Context<'_>) -> FieldResult<Vec<Advisory>> {
let db = ctx.data::<Arc<Database>>()?;
let graph = ctx.data::<Arc<Graph>>()?;

Expand Down
4 changes: 2 additions & 2 deletions modules/graphql/src/organization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Organization> {
let db = ctx.data::<Arc<Database>>()?;
Expand Down
6 changes: 3 additions & 3 deletions modules/graphql/src/sbom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct SbomQuery;

#[Object]
impl SbomQuery {
async fn get_sbom_by_id<'a>(&self, ctx: &Context<'a>, id: Uuid) -> FieldResult<Sbom> {
async fn get_sbom_by_id(&self, ctx: &Context<'_>, id: Uuid) -> FieldResult<Sbom> {
let db = ctx.data::<Arc<Database>>()?;
let graph = ctx.data::<Arc<Graph>>()?;
let sbom = graph.locate_sbom_by_id(id, db.as_ref()).await;
Expand All @@ -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<Vec<Sbom>> {
let db = ctx.data::<Arc<Database>>()?;
Expand Down
4 changes: 2 additions & 2 deletions modules/graphql/src/sbomstatus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<GraphQLSbomStatus>> {
let db = ctx.data::<Arc<db::Database>>()?;
Expand Down
6 changes: 3 additions & 3 deletions modules/graphql/src/vulnerability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vulnerability> {
let db = ctx.data::<Arc<Database>>()?;
Expand All @@ -33,7 +33,7 @@ impl VulnerabilityQuery {
}
}

async fn get_vulnerabilities<'a>(&self, ctx: &Context<'a>) -> FieldResult<Vec<Vulnerability>> {
async fn get_vulnerabilities(&self, ctx: &Context<'_>) -> FieldResult<Vec<Vulnerability>> {
let db = ctx.data::<Arc<Database>>()?;
let graph = ctx.data::<Arc<Graph>>()?;
let vulnerabilities = graph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl<'g> From<(&AdvisoryContext<'g>, entity::advisory_vulnerability::Model)>
}
}

impl<'g> AdvisoryVulnerabilityContext<'g> {
impl AdvisoryVulnerabilityContext<'_> {
pub async fn vulnerability<C: ConnectionTrait>(
&self,
connection: &C,
Expand Down
4 changes: 2 additions & 2 deletions modules/ingestor/src/service/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
digests: &Digests,
Expand Down
3 changes: 2 additions & 1 deletion modules/ingestor/tests/reingest/spdx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -41,7 +42,7 @@ async fn reingest(ctx: &TrustifyContext) -> Result<(), anyhow::Error> {
.into_iter()
.map(|purl| purl.qualified_package.id)
.collect::<Vec<_>>(),
vec![]
Vec::<Uuid>::new()
);

// get product
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.83.0"
channel = "1.84.0"
components = [ "rustfmt", "clippy" ]

0 comments on commit aedb97e

Please sign in to comment.