Skip to content

Commit

Permalink
Remove visibility limiter pub (crate) from Metadata (paritytech#162)
Browse files Browse the repository at this point in the history
* Remove visibility limiter `pub (crate)`

* Run fmt

* Add comments
  • Loading branch information
enfipy committed Sep 14, 2020
1 parent e85d01e commit f2cf798
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,8 @@ impl Metadata {
.ok_or(MetadataError::ModuleNotFound(name))
}

pub(crate) fn module_with_calls<S>(
&self,
name: S,
) -> Result<&ModuleWithCalls, MetadataError>
/// Returns `ModuleWithCalls`.
pub fn module_with_calls<S>(&self, name: S) -> Result<&ModuleWithCalls, MetadataError>
where
S: ToString,
{
Expand All @@ -106,11 +104,13 @@ impl Metadata {
.ok_or(MetadataError::ModuleNotFound(name))
}

pub(crate) fn modules_with_events(&self) -> impl Iterator<Item = &ModuleWithEvents> {
/// Returns Iterator of `ModuleWithEvents`.
pub fn modules_with_events(&self) -> impl Iterator<Item = &ModuleWithEvents> {
self.modules_with_events.values()
}

pub(crate) fn module_with_events(
/// Returns `ModuleWithEvents`.
pub fn module_with_events(
&self,
module_index: u8,
) -> Result<&ModuleWithEvents, MetadataError> {
Expand All @@ -120,7 +120,8 @@ impl Metadata {
.ok_or(MetadataError::ModuleIndexNotFound(module_index))
}

pub(crate) fn module_with_errors(
/// Returns `ModuleWithErrors`.
pub fn module_with_errors(
&self,
module_index: u8,
) -> Result<&ModuleWithErrors, MetadataError> {
Expand Down

0 comments on commit f2cf798

Please sign in to comment.