Skip to content

Commit

Permalink
rename fn
Browse files Browse the repository at this point in the history
  • Loading branch information
ukint-vs committed Sep 19, 2023
1 parent 604abeb commit 83c3ccc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pallets/gear/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ where
self.client
.runtime_api()
.api_version::<dyn GearRuntimeApi<Block>>(at_hash)
.map_err(|e| map_err(e, "Failed to get gear runtime api version"))?
.map_err(|e| into_call_err(e, "Failed to get gear runtime api version"))?
.ok_or_else(|| {
CallError::Custom(ErrorObject::owned(
8000,
Expand Down Expand Up @@ -245,7 +245,7 @@ impl From<Error> for i64 {
}
}

fn map_err(error: impl ToString, desc: &'static str) -> CallError {
fn into_call_err(error: impl ToString, desc: &'static str) -> CallError {
CallError::Custom(ErrorObject::owned(8000, desc, Some(error.to_string())))
}

Expand Down

0 comments on commit 83c3ccc

Please sign in to comment.