Skip to content

Commit

Permalink
use ok_or
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Sep 26, 2024
1 parent 97db905 commit 4ebacf0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion basecoin/modules/src/gov/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ where
_height: Height,
_prove: bool,
) -> Result<QueryResult, AppError> {
let path = path.ok_or_else(|| AppError::NotHandled)?;
let path = path.ok_or(AppError::NotHandled)?;

if path.to_string() != "/cosmos.gov.v1beta1.Query/Proposal" {
return Err(AppError::NotHandled);
Expand Down
2 changes: 1 addition & 1 deletion basecoin/modules/src/ibc/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ where
height: Height,
prove: bool,
) -> Result<QueryResult, AppError> {
let path = path.ok_or_else(|| AppError::NotHandled)?;
let path = path.ok_or(AppError::NotHandled)?;
if path.to_string() != IBC_QUERY_PATH {
return Err(AppError::NotHandled);
}
Expand Down
2 changes: 1 addition & 1 deletion basecoin/modules/src/upgrade/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ where
height: Height,
prove: bool,
) -> Result<QueryResult, AppError> {
let path = path.ok_or_else(|| AppError::NotHandled)?;
let path = path.ok_or(AppError::NotHandled)?;
if path.to_string() == SDK_UPGRADE_QUERY_PATH {
let path: Path = String::from_utf8(data.to_vec())
.map_err(|_| AppError::Custom {
Expand Down

0 comments on commit 4ebacf0

Please sign in to comment.