Skip to content

Commit 6b27c8b

Browse files
committed
refactor: use a more appropriate type to declare an artifact location
1 parent 41f2c6b commit 6b27c8b

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

mithril-common/src/entities/cardano_database.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,19 @@ impl CardanoDatabase {
5353

5454
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
5555
#[serde(rename_all = "snake_case")]
56-
pub enum ArtifactLocationType {
57-
Aggregator,
58-
}
59-
60-
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
61-
pub struct ArtifactLocationEntry {
62-
#[serde(rename = "type")]
63-
pub location_type: ArtifactLocationType,
64-
pub uri: String,
56+
pub enum ArtifactLocation {
57+
Aggregator(String),
6558
}
6659

6760
/// Locations of the Cardano database related files.
6861
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
6962
pub struct ArtifactsLocations {
7063
/// Locations of the file containing the digests of the immutable files.
71-
pub digests: Vec<ArtifactLocationEntry>,
64+
pub digests: Vec<ArtifactLocation>,
7265
/// Locations of the immutable files.
73-
pub immutables: Vec<ArtifactLocationEntry>,
66+
pub immutables: Vec<ArtifactLocation>,
7467
/// Locations of the ancillary files (ledger and volatile).
75-
pub ancillary: Vec<ArtifactLocationEntry>,
68+
pub ancillary: Vec<ArtifactLocation>,
7669
}
7770

7871
#[typetag::serde]

0 commit comments

Comments
 (0)