Skip to content

Make more thing infallible; remove some error types - #611

Merged
notpeter merged 2 commits into
mainfrom
fallability
Nov 11, 2026
Merged

notpeter merged 2 commits into
mainfrom
fallability

Conversation

@notpeter

Copy link
Copy Markdown
Collaborator

Remove custom Errors for calls which are actually infallible.

  • None of the RfdDocument mutators could actually fail.
    Markdown used type Error = ()
    Asciidoc errors were only for regex compilation failure.
  • Switch to using regex!, drop type Error from the trait;
    mutators now return &mut Self.
  • Remove error types:
    • RfdAsciidocError
    • RfdContentError
    • GitHubError::InvalidContent
    • RenderableRfdError::InvalidRfdContent
    • UpdateRfdContentError::InvalidContent
    • RfdError::Asciidoc
    • RfdUpdaterError::ContentOfExistingRfd
  • Remove "Update would result in a malformed RFD" 400 from set-attribute endpoint.
    It was unreachable.
  • Make some regexes compile once with regex! (infallible) instead of at runtime

@notpeter
notpeter merged commit 5b9fc55 into main Nov 11, 2026
9 checks passed
@notpeter
notpeter deleted the fallability branch November 11, 2026 16:22
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