Skip to content

refactor: cleanups for error refactor - #137

Merged
Frando merged 4 commits into
Frando/error-casesfrom
Frando/error-cases-fixes
Oct 9, 2026
Merged

Frando merged 4 commits into
Frando/error-casesfrom
Frando/error-cases-fixes

Conversation

@Frando

@Frando Frando commented Oct 9, 2026

Copy link
Copy Markdown
Member

A few minor tweaks to the error refactor (#130):

  • Proper docs formatting
  • Also send correct error codes when using try_send
  • Use an explicit function instead of a default when taking NoqSendState

Frando added 4 commits October 9, 2026 10:48
`send` resets the stream if a message is too large or does not encode,
but `try_send` only returned the error. The sender then closed, and the
drop of the stream finished it, so the receiver saw a clean end instead
of an error. Both now encode through one helper that resets the stream.
`mem::take` with a `Default` impl hid the state that a cancelled send
leaves behind. `take_for_send` names it and says why the sender stays
closed.
Inline links with a target that differs from their text make the doc comments harder to read in the source. They now point to reference definitions at the end of each doc comment.
@Frando
Frando merged commit 7fbbc6b into Frando/error-cases Oct 9, 2026
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