From 4ebacf0e0716a0505b7f8111242c484b93349b6c Mon Sep 17 00:00:00 2001 From: Ranadeep Biswas Date: Thu, 26 Sep 2024 17:14:46 +0200 Subject: [PATCH] use ok_or --- basecoin/modules/src/gov/impls.rs | 2 +- basecoin/modules/src/ibc/impls.rs | 2 +- basecoin/modules/src/upgrade/impls.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basecoin/modules/src/gov/impls.rs b/basecoin/modules/src/gov/impls.rs index 270342c..388be43 100644 --- a/basecoin/modules/src/gov/impls.rs +++ b/basecoin/modules/src/gov/impls.rs @@ -134,7 +134,7 @@ where _height: Height, _prove: bool, ) -> Result { - 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); diff --git a/basecoin/modules/src/ibc/impls.rs b/basecoin/modules/src/ibc/impls.rs index 2f8f8ac..31d7450 100644 --- a/basecoin/modules/src/ibc/impls.rs +++ b/basecoin/modules/src/ibc/impls.rs @@ -278,7 +278,7 @@ where height: Height, prove: bool, ) -> Result { - 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); } diff --git a/basecoin/modules/src/upgrade/impls.rs b/basecoin/modules/src/upgrade/impls.rs index 3e33c37..f94ad6f 100644 --- a/basecoin/modules/src/upgrade/impls.rs +++ b/basecoin/modules/src/upgrade/impls.rs @@ -100,7 +100,7 @@ where height: Height, prove: bool, ) -> Result { - 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 {