Skip to content

create_stream rustdoc Errors omits InvalidRate#953

Open
akprinciple wants to merge 1 commit into
LabsCrypt:mainfrom
akprinciple:create_stream_rustdoc_Errors_omits_InvalidRate
Open

create_stream rustdoc Errors omits InvalidRate#953
akprinciple wants to merge 1 commit into
LabsCrypt:mainfrom
akprinciple:create_stream_rustdoc_Errors_omits_InvalidRate

Conversation

@akprinciple

Copy link
Copy Markdown

docs: Add InvalidRate to create_stream # Errors list

closes #797
This PR addresses a documentation inconsistency in the create_stream function. The function can return StreamError::InvalidRate when the calculated rate per second truncates to zero, but this error was missing from the function's doc comment in the # Errors section.

This change updates the documentation to include InvalidRate, ensuring that developers are aware of all possible error conditions when using the function.

Why this matters

The # Errors section for create_stream was out of sync with the implementation. It was missing the InvalidRate error, which can occur when net_amount / duration truncates to 0. Accurate documentation is crucial for contract usability and helps prevent integration errors.

Acceptance Criteria

  • The InvalidRate error is added to the # Errors list in the create_stream function's doc comment in contracts/stream_contract/src/lib.rs.

Out of Scope

  • Updating the # Errors sections for any other functions.

@ogazboiz

ogazboiz commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

heads up: main's ci was broken (the Backend CI and Backend Docker Image CI jobs) until the fixes in #969 and #974 just landed, so the red backend/docker checks on this pr are almost certainly stale, they ran against the broken main. please rebase to re-test against the now-green main: git fetch origin && git rebase origin/main && git push --force-with-lease. once it's green i'll review and merge. (if a non-backend check like Frontend CI is still red after the rebase, that part is a real issue worth a look, since frontend ci was passing on main.)

@akprinciple akprinciple force-pushed the create_stream_rustdoc_Errors_omits_InvalidRate branch from 2429fdf to 894cff7 Compare July 1, 2026 13:58
@akprinciple

Copy link
Copy Markdown
Author

@ogazboiz Kindly check now boss

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.

[Docs] create_stream rustdoc # Errors omits InvalidRate

2 participants