Skip to content

Fix multiline if let chains in gem_hypercore client#1014

Merged
gemcoder21 merged 2 commits intocodex/hip-3-perpsfrom
copilot/sub-pr-1009-another-one
Mar 16, 2026
Merged

Fix multiline if let chains in gem_hypercore client#1014
gemcoder21 merged 2 commits intocodex/hip-3-perpsfrom
copilot/sub-pr-1009-another-one

Conversation

Copy link
Contributor

Copilot AI commented Mar 15, 2026

Four if let guard chains in crates/gem_hypercore/src/rpc/client.rs were unnecessarily split across three lines, reducing readability.

Consolidated all occurrences to single-line form:

// Before
if let Some(dex) = dex
    && !dex.is_empty()
{
    payload["dex"] = json!(dex);
}

// After
if let Some(dex) = dex && !dex.is_empty() {
    payload["dex"] = json!(dex);
}

Affected methods: get_clearinghouse_state_with_dex, get_metadata_with_dex, get_open_orders_with_dex, get_perpetual_portfolio_with_dex.


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: gemcoder21 <104884878+gemcoder21@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on reopening HIP3 support PR Fix multiline if let chains in gem_hypercore client Mar 15, 2026
Copilot AI requested a review from gemcoder21 March 15, 2026 23:09
@gemcoder21 gemcoder21 marked this pull request as ready for review March 16, 2026 02:15
@gemcoder21 gemcoder21 merged commit b064ba2 into codex/hip-3-perps Mar 16, 2026
@gemcoder21 gemcoder21 deleted the copilot/sub-pr-1009-another-one branch March 16, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants