Skip to content

Commit

Permalink
elide unnecessary check in FnCacheGet
Browse files Browse the repository at this point in the history
  • Loading branch information
espadolini committed Jan 20, 2025
1 parent ed7173f commit 25ce660
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/utils/fncache.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ func FnCacheGetWithTTL[T any](ctx context.Context, cache *FnCache, key any, ttl
switch {
case err != nil:
return ret, err
case t == nil:
return ret, nil
case !ok:
return ret, trace.BadParameter("value retrieved was %T, expected %T", t, ret)
}
Expand Down

0 comments on commit 25ce660

Please sign in to comment.