Skip to content

Conversation

@Firgrep
Copy link
Member

@Firgrep Firgrep commented Jul 10, 2025

  • refactor: simplify footnote detection
  • refactor: clippy warnings on inserters
  • refactor: needless references and complex returns
  • refactor: remove needless let binding
  • refactor: simplify smaller transformer function returns
  • refactor: use &[] instead of &Vec<_>
  • refactor: use match with ordering instead of if expressions
  • refactor: remove needless refrences, use contains instead of manual number range finding
  • refactor: replace splitn with split
  • refactor: use is_none() instead of binary comparisons

Firgrep added 12 commits July 10, 2025 12:23
Using chars instead of strings where possible and &str instead of
&String where sufficient.
? with Ok() is needless where just returning the result is fine.
Remove needless references
- &[T] (slice) is more flexible than &Vec<T> - it can accept arrays,
slices, and Vec references
- &Vec<T> forces callers to have a Vec, while &[T] works with any
contiguous collection
- There's no performance difference since &Vec<T> automatically derefs
to &[T] when needed
If expressions can leave unaccounted options, whereas match is stricter.
splitn() is needless in this case
@Firgrep Firgrep marked this pull request as ready for review October 10, 2025 12:21
@Firgrep Firgrep merged commit 992de80 into main Oct 10, 2025
2 checks passed
@Firgrep Firgrep deleted the patch/error-types branch October 10, 2025 12:21
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