chore(blend-adapter): replace expect() with typed ContractError in accrue - #475
Conversation
|
@Adecom16 is attempting to deploy a commit to the Collins' projects Team on Vercel. A member of the Team first needs to authorize it. |
collinsezedike
left a comment
There was a problem hiding this comment.
The code is correct and matches #459's plan: both .expect() calls are replaced with ContractError::Overflow, accrue() now returns Result<(), ContractError>, existing tests updated to try_accrue(), and a new test exercises the overflow path directly rather than just changing the signature without covering it.
CI is failing on Commit Messages: the header "chore(blend-adapter): replace expect() with typed ContractError in accrue" is 73 characters, over the 72-character limit. Shorten it and push.
5ba42fc to
fb4ce6c
Compare
|
Hi @collinsezedike, I've updated the commit message to meet the 72-character limit and pushed the changes. The requested change has been addressed. Thanks!
|
collinsezedike
left a comment
There was a problem hiding this comment.
Header's fixed and CI is green. The fix itself was already verified: correctly collapses both .expect() calls into ContractError::Overflow, accrue() returns Result<(), ContractError>, tests updated to try_accrue(), and the new accrue_returns_typed_error_on_overflow test exercises the overflow path directly.
Thank you for sticking with this through the review back-and-forth.
Merging now.
Closes #459
Summary
expect()calls inaccrue()with typedContractErrorpropagation.accrue()to returnResult<(), ContractError>.Test plan
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test