From 4a7a6411ef88726887157d656b2ce7e10f91d313 Mon Sep 17 00:00:00 2001 From: ipangpang <167595720+ipangpang@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:10:34 +0800 Subject: [PATCH] fix: remove useless condition (#20118) Signed-off-by: ipangpang --- depinject/container.go | 3 --- testutil/sims/app_helpers.go | 6 +----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/depinject/container.go b/depinject/container.go index 945d42c3130b..7816f56abf42 100644 --- a/depinject/container.go +++ b/depinject/container.go @@ -236,9 +236,6 @@ func (c *container) addNode(provider *providerDescriptor, key *moduleKey) (inter typeGraphNode = vr.typeGraphNode() } else { typeGraphNode = c.typeGraphNode(typ) - if err != nil { - return nil, err - } } c.addGraphEdge(typeGraphNode, providerGraphNode) diff --git a/testutil/sims/app_helpers.go b/testutil/sims/app_helpers.go index c97b70c0a0b0..ee240ad057fd 100644 --- a/testutil/sims/app_helpers.go +++ b/testutil/sims/app_helpers.go @@ -130,11 +130,7 @@ func NextBlock(app *runtime.App, ctx sdk.Context, jumpTime time.Duration) (sdk.C Time: header.Time, }) - if err != nil { - return sdk.Context{}, err - } - - return newCtx, err + return newCtx, nil } // SetupWithConfiguration initializes a new runtime.App. A Nop logger is set in runtime.App.