Skip to content

Commit

Permalink
chore: remove unused AssetEvent::Metadata* (#5339)
Browse files Browse the repository at this point in the history
* chore: remove unused `AssetEvent::Metadata*`
* refactor: remove `#[non_exhaustive]` to finalize enum events

Signed-off-by: Shunkichi Sato <49983831+s8sato@users.noreply.github.com>
  • Loading branch information
s8sato authored Mar 2, 2025
1 parent 346a944 commit 4bfeff8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
7 changes: 0 additions & 7 deletions crates/iroha_data_model/src/events/data/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ macro_rules! data_event {
serde::Serialize,
iroha_schema::IntoSchema,
)]
#[non_exhaustive]
#[ffi_type]
$item
}
Expand Down Expand Up @@ -103,7 +102,6 @@ mod asset {
pub use self::model::*;
use super::*;

type AssetMetadataChanged = MetadataChanged<AssetId>;
type AssetDefinitionMetadataChanged = MetadataChanged<AssetDefinitionId>;

data_event! {
Expand All @@ -116,10 +114,6 @@ mod asset {
Added(AssetChanged),
#[has_origin(asset_changed => &asset_changed.asset)]
Removed(AssetChanged),
#[has_origin(metadata_changed => &metadata_changed.target)]
MetadataInserted(AssetMetadataChanged),
#[has_origin(metadata_changed => &metadata_changed.target)]
MetadataRemoved(AssetMetadataChanged),
}
}

Expand Down Expand Up @@ -625,7 +619,6 @@ mod executor {
iroha_schema::IntoSchema,
EventSet,
)]
#[non_exhaustive]
#[ffi_type(opaque)]
#[serde(untagged)] // Unaffected by #3330, as single unit variant
#[repr(transparent)]
Expand Down
34 changes: 0 additions & 34 deletions docs/source/references/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -620,16 +620,6 @@
"tag": "Removed",
"discriminant": 3,
"type": "AssetChanged"
},
{
"tag": "MetadataInserted",
"discriminant": 4,
"type": "MetadataChanged<AssetId>"
},
{
"tag": "MetadataRemoved",
"discriminant": 5,
"type": "MetadataChanged<AssetId>"
}
]
},
Expand Down Expand Up @@ -664,14 +654,6 @@
{
"name": "Removed",
"mask": 8
},
{
"name": "MetadataInserted",
"mask": 16
},
{
"name": "MetadataRemoved",
"mask": 32
}
]
}
Expand Down Expand Up @@ -2787,22 +2769,6 @@
}
]
},
"MetadataChanged<AssetId>": {
"Struct": [
{
"name": "target",
"type": "AssetId"
},
{
"name": "key",
"type": "Name"
},
{
"name": "value",
"type": "Json"
}
]
},
"MetadataChanged<DomainId>": {
"Struct": [
{
Expand Down

0 comments on commit 4bfeff8

Please sign in to comment.