@@ -18,6 +18,7 @@ pub struct ArtifactBuilderService {
18
18
19
19
impl ArtifactBuilderService {
20
20
/// ArtifactBuilderService factory
21
+ #[ allow( dead_code) ]
21
22
pub fn new ( dummy_artifact_builder : DummyArtifactBuilder ) -> Self {
22
23
Self {
23
24
dummy_artifact_builder,
@@ -30,7 +31,7 @@ impl ArtifactBuilderService {
30
31
async fn compute_artifact (
31
32
& self ,
32
33
signed_entity_type : SignedEntityType ,
33
- certificate : Certificate ,
34
+ certificate : & Certificate ,
34
35
) -> StdResult < Arc < impl Artifact > > {
35
36
let artifact = match signed_entity_type {
36
37
SignedEntityType :: MithrilStakeDistribution ( e) => Arc :: new (
@@ -69,19 +70,19 @@ mod tests {
69
70
70
71
let signed_entity_type_1 = SignedEntityType :: MithrilStakeDistribution ( Epoch ( 1 ) ) ;
71
72
let artifact_1 = artifact_builder_service
72
- . compute_artifact ( signed_entity_type_1, certificate. clone ( ) )
73
+ . compute_artifact ( signed_entity_type_1, & certificate)
73
74
. await
74
75
. unwrap ( ) ;
75
76
76
77
let signed_entity_type_2 = SignedEntityType :: CardanoStakeDistribution ( Epoch ( 0 ) ) ;
77
78
let artifact_2 = artifact_builder_service
78
- . compute_artifact ( signed_entity_type_2, certificate. clone ( ) )
79
+ . compute_artifact ( signed_entity_type_2, & certificate)
79
80
. await
80
81
. unwrap ( ) ;
81
82
82
83
let signed_entity_type_3 = SignedEntityType :: CardanoImmutableFilesFull ( Beacon :: default ( ) ) ;
83
84
let artifact_3 = artifact_builder_service
84
- . compute_artifact ( signed_entity_type_3, certificate)
85
+ . compute_artifact ( signed_entity_type_3, & certificate)
85
86
. await
86
87
. unwrap ( ) ;
87
88
0 commit comments