@@ -21,7 +21,7 @@ use sbom_walker::{
2121 model:: sbom:: serde_cyclonedx:: Sbom ,
2222 report:: { ReportSink , check} ,
2323} ;
24- use sea_orm:: { ConnectionTrait , TransactionTrait } ;
24+ use sea_orm:: ConnectionTrait ;
2525use serde_cyclonedx:: cyclonedx:: v_1_6:: {
2626 Component , ComponentEvidenceIdentity , CycloneDx , LicenseChoiceUrl , OrganizationalContact ,
2727} ;
@@ -138,15 +138,12 @@ impl<'a> From<Information<'a>> for SbomInformation {
138138
139139impl SbomContext {
140140 #[ instrument( skip( connection, sbom, warnings) , err( level=tracing:: Level :: INFO ) ) ]
141- pub async fn ingest_cyclonedx < C > (
141+ pub async fn ingest_cyclonedx (
142142 & self ,
143143 mut sbom : Box < CycloneDx > ,
144144 warnings : & dyn ReportSink ,
145- connection : & C ,
146- ) -> Result < ( ) , Error >
147- where
148- C : ConnectionTrait + TransactionTrait ,
149- {
145+ connection : & impl ConnectionTrait ,
146+ ) -> Result < ( ) , Error > {
150147 // pre-flight checks
151148
152149 check:: serde_cyclonedx:: all ( warnings, & Sbom :: V1_6 ( Cow :: Borrowed ( & sbom) ) ) ;
@@ -288,10 +285,7 @@ impl<'a> Creator<'a> {
288285 }
289286
290287 #[ instrument( skip( self , db, processors) , err( level=tracing:: Level :: INFO ) ) ]
291- pub async fn create < C > ( self , db : & C , processors : & mut [ Box < dyn Processor > ] ) -> Result < ( ) , Error >
292- where
293- C : ConnectionTrait + TransactionTrait ,
294- {
288+ pub async fn create ( self , db : & impl ConnectionTrait , processors : & mut [ Box < dyn Processor > ] ) -> Result < ( ) , Error > {
295289 let mut creator = ComponentCreator :: new ( self . sbom_id , self . components . len ( ) ) ;
296290
297291 for comp in self . components {
@@ -578,10 +572,7 @@ impl ComponentCreator {
578572 // order matters to prevent cross-table deadlocks when running
579573 // concurrent SBOM ingestions. All SBOM loaders must use the same
580574 // table insertion order.
581- async fn create < C > ( self , db : & C ) -> Result < ( ) , Error >
582- where
583- C : ConnectionTrait + TransactionTrait ,
584- {
575+ async fn create ( self , db : & impl ConnectionTrait ) -> Result < ( ) , Error > {
585576 self . licenses . create ( db) . await ?;
586577 self . purls . create ( db) . await ?;
587578 self . cpes . create ( db) . await ?;
0 commit comments