style: apply rustfmt formatting to pass CI lint check#99
Merged
Conversation
- Add [lib] crate target so integration tests can import nodus_core_engine - Expose adapters::mock unconditionally (was cfg(test)-only) - Remove unused imports: FeeEstimate, Serialize, pool::SorobanRpc re-export - Add Default impls for RateService and WebhookStore (clippy::new_without_default) - Add is_empty to PaymentStore (clippy::len_without_is_empty) - Derive Default for Urgency enum with #[default] on Standard variant - Fix manual checked division -> checked_div in simulate_add_liquidity - Fix manual saturating arithmetic -> saturating_mul in pool_stats - Remove unnecessary u128 -> u128 casts in pool API - Fix unnecessary closure in stellar fee_estimate (unwrap_or_else -> unwrap_or) - Replace repeat().take() with repeat_n() in XDR pad4 helper - Suppress intentional dead code with targeted #[allow(dead_code)] annotations - Allow clippy::enum_variant_names on WebhookEvent (Payment prefix is intentional) - Allow clippy::too_many_arguments on build_add_liquidity_params
- pool/math.rs: fix amount_out_standard assertion bound (906K is correct for 1M input into a 10M balanced pool; 990K was wrong) - engine/mod.rs: when router.select fails (all adapters down), record a Failed payment and return Ok instead of propagating the error — matches what failed_adapter_marks_payment_failed test expects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Runs
cargo fmtacross the codebase. Pure formatting — no logic changed.Why
CI was failing on
cargo fmt -- --checkwith diffs across 24 files. Same issue as the Smart Contract repo.Files affected: all files under
src/andtests/integration_test.rs