Skip to content

Commit

Permalink
Harmonize macro usage (#1623)
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez authored Nov 16, 2023
1 parent a557b9d commit 1a2af39
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions sdk/src/types/api/plugins/participation/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use getset::Getters;
use hashbrown::HashMap;
use packable::PackableExt;

use crate::types::{api::plugins::participation::error::Error, block::impl_id};
use crate::types::api::plugins::participation::error::Error;

/// Participation tag.
pub const PARTICIPATION_TAG: &str = "PARTICIPATE";
Expand Down Expand Up @@ -51,7 +51,7 @@ pub struct ParticipationEvent {
pub data: ParticipationEventData,
}

impl_id!(
crate::impl_id!(
/// A participation event id.
pub ParticipationEventId {
pub const LENGTH: usize = 32;
Expand Down
2 changes: 0 additions & 2 deletions sdk/src/types/block/macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ macro_rules! impl_id {
)?
};
}
pub(crate) use impl_id;

/// Convenience macro to serialize types to string via serde.
#[cfg(feature = "serde")]
Expand Down Expand Up @@ -297,7 +296,6 @@ macro_rules! create_bitflags {
}
};
}
pub(crate) use create_bitflags;

#[macro_export]
macro_rules! impl_serde_typed_dto {
Expand Down
3 changes: 1 addition & 2 deletions sdk/src/types/block/output/feature/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub use self::{
tag::TagFeature,
};
use crate::types::block::{
create_bitflags,
output::{StorageScore, StorageScoreParameters},
Error,
};
Expand Down Expand Up @@ -126,7 +125,7 @@ impl Feature {
crate::def_is_as_opt!(Feature: Sender, Issuer, Metadata, Tag, BlockIssuer, Staking);
}

create_bitflags!(
crate::create_bitflags!(
/// A bitflags-based representation of the set of active [`Feature`]s.
pub FeatureFlags,
u16,
Expand Down
3 changes: 1 addition & 2 deletions sdk/src/types/block/output/unlock_condition/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pub use self::{
};
use crate::types::block::{
address::Address,
create_bitflags,
output::{StorageScore, StorageScoreParameters},
protocol::ProtocolParameters,
slot::SlotIndex,
Expand Down Expand Up @@ -135,7 +134,7 @@ impl UnlockCondition {
);
}

create_bitflags!(
crate::create_bitflags!(
/// A bitflags-based representation of the set of active [`UnlockCondition`]s.
pub UnlockConditionFlags,
u16,
Expand Down

0 comments on commit 1a2af39

Please sign in to comment.