Skip to content

fix: API ergonomics from dev feedback (0.2.2)#5

Merged
amavashev merged 3 commits into
mainfrom
fix/dev-feedback-0.2.2
Apr 2, 2026
Merged

fix: API ergonomics from dev feedback (0.2.2)#5
amavashev merged 3 commits into
mainfrom
fix/dev-feedback-0.2.2

Conversation

@amavashev
Copy link
Copy Markdown
Contributor

Summary

Addresses developer feedback on API ergonomics gaps:

  • Remove misleading BlockingCyclesClient::builder() — it returned CyclesClientBuilder whose build() silently produced an async client. Replaced with CyclesClientBuilder::build_blocking() which correctly returns Result<BlockingCyclesClient, Error>
  • Add Amount::risk_points() constructorRISK_POINTS is a first-class protocol unit but was the only one missing a convenience constructor
  • Add SignedAmount constructorsusd_microcents(), tokens(), credits(), risk_points() for parity with Amount
  • Add BlockingCyclesClient::config() and create_reservation_with_metadata() — parity methods that existed on the async client but were missing from blocking

Version bumped to 0.2.2. CHANGELOG and AUDIT.md updated.

Test plan

  • cargo build --all-features — clean
  • cargo clippy --all-features -- -W clippy::all — clean
  • cargo fmt --check — clean
  • cargo test --all-features — 142 tests pass
  • cargo tarpaulin — 96.40% coverage (above 95% threshold)
  • No remaining references to removed BlockingCyclesClient::builder()
  • Doc-tests pass (no stale API references)

…isk_points()

- Remove BlockingCyclesClient::builder() that silently returned an async
  client builder; add CyclesClientBuilder::build_blocking() instead
- Add Amount::risk_points() convenience constructor for RISK_POINTS unit
- Bump version to 0.2.2
- Add usd_microcents(), tokens(), credits(), risk_points() to SignedAmount
  matching Amount's convenience constructors
- Add BlockingCyclesClient::config() accessor for parity with async client
- Add BlockingCyclesClient::create_reservation_with_metadata() for
  accessing response headers in blocking mode
@amavashev amavashev merged commit 4ffc0df into main Apr 2, 2026
3 checks passed
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.

1 participant