From f2cf79847a0bf473720750a1fd2f2cd3e22c8e8e Mon Sep 17 00:00:00 2001 From: David Ackerman Date: Mon, 14 Sep 2020 16:51:42 +0200 Subject: [PATCH] Remove visibility limiter `pub (crate)` from Metadata (#162) * Remove visibility limiter `pub (crate)` * Run fmt * Add comments --- src/metadata.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/metadata.rs b/src/metadata.rs index 176db3aa99..1748c1440b 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -93,10 +93,8 @@ impl Metadata { .ok_or(MetadataError::ModuleNotFound(name)) } - pub(crate) fn module_with_calls( - &self, - name: S, - ) -> Result<&ModuleWithCalls, MetadataError> + /// Returns `ModuleWithCalls`. + pub fn module_with_calls(&self, name: S) -> Result<&ModuleWithCalls, MetadataError> where S: ToString, { @@ -106,11 +104,13 @@ impl Metadata { .ok_or(MetadataError::ModuleNotFound(name)) } - pub(crate) fn modules_with_events(&self) -> impl Iterator { + /// Returns Iterator of `ModuleWithEvents`. + pub fn modules_with_events(&self) -> impl Iterator { 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> { @@ -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> {