Skip to content

fix(ledger-core): remove conflicting From impl in ingest.rs#93

Merged
elasticdotventures merged 1 commit into
mainfrom
fix/ingest-tryfrom-conflict
May 12, 2026
Merged

fix(ledger-core): remove conflicting From impl in ingest.rs#93
elasticdotventures merged 1 commit into
mainfrom
fix/ingest-tryfrom-conflict

Conversation

@promptexecutionerr
Copy link
Copy Markdown
Collaborator

Summary

  • Removes impl From<&TransactionInput> for DocumentFields which conflicted with Rust's blanket TryFrom<U> for T where U: Into<T> — both impls resolved to TryFrom<&TransactionInput> for DocumentFields, producing E0119
  • The TryFrom impl (added in the same commit as From) is the correct, fallible version: it parses amount from string to Decimal and returns DocumentFieldsParseError on failure — so From was redundant and incorrect

Test plan

  • cargo build --workspace — clean, no E0119
  • cargo test -p ledger-core — all tests pass including transaction_input_to_document_fields_parses_amount and transaction_input_to_document_fields_rejects_invalid_amount

@copilot please review

🤖 Generated with Claude Code

From<&TransactionInput> for DocumentFields conflicted with Rust's blanket
TryFrom via Into. Keep only TryFrom (the fallible parse-aware version).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@elasticdotventures elasticdotventures merged commit 73d5250 into main May 12, 2026
0 of 2 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.

2 participants