Repository navigation
Miscellaneous Code Cleanups - #915
TheLostLambda wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Re. third commit, there's a clippy lint you can enable to enforce this (there is also one for the other way around, if one prefers mod.rs). And while mod.rs is the older style in the sense that it's been supported for longer, there is no consensus in the Rust community as to which one is better.
| } | ||
|
|
||
| // TODO: Box errors consistently throughout the codebase so that this can be removed | ||
| #[expect(clippy::result_large_err)] |
There was a problem hiding this comment.
Honestly I would just allow this via workspace.lints.clippy. Probably not that big of a deal.
I also updated the version of `typos-cli` used in the CI, and fixed the one new "typo" it identified.
I tried boxing some of the error variants, but it ended up being a really messy mix of boxed and non-boxed `Error`s. I think that, to solve this issue properly, we need to pull the `BoxedError` type out into its own crate that's shared with `boulder`, before systematically converting existing `Error`s to it somehow...
Apparently using `mod.rs` files is the older way of doing things. I noticed that the `event.rs` module was using the newer style, so I've brought the rest of the repo up to date! https://doc.rust-lang.org/book/ch07-05-separating-modules-into-different-files.html#alternate-file-paths This is a bit tangential to the rest of my refactor work, so I'm happy to split it out into a different PR.
675fcee to
57cbb80
Compare
|
Thanks for the review, @jplatte ! I've integrated your suggestions for commits 1 and 3, but I'm still waiting to see what people think about globally allowing that As for the |
Here are some things I've encountered whilst experimenting in #914!
That PR is built on top of this one, and this one is ready to merge whenever.
These commits are conceptually unrelated to the lib/cli split.