New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move regex-capi to 2021 & inline format-args #1109
base: master
Are you sure you want to change the base?
Conversation
This makes the code a bit easier to read and smaller. Some of it was done with this command, and later fixed by hand: ``` cargo clippy --workspace --allow-dirty --fix --benches --tests --bins -- -A clippy::all -W clippy::uninlined_format_args ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Just a couple of nits and this should be good to go.
@@ -11,7 +11,7 @@ description = """ | |||
A C API for Rust's regular expression library. | |||
""" | |||
workspace = ".." | |||
edition = "2018" | |||
edition = "2021" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably set rust-version = "1.65"
for consistency with other crates?
regex-capi/src/macros.rs
Outdated
&mut io::stderr(), | ||
"panic unwind caught, aborting: {:?}", | ||
msg); | ||
let _ = writeln!(&mut io::stderr(), "panic unwind caught, aborting: {msg:?}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I follow a 79 column (inclusive) rule. I'm kind of surprised rustfmt
doesn't take care of this here... Oh, because it's in a macro. So it will need to be wrapped manually.
fixed |
@BurntSushi hi, friendly ping - let me know if anything else is needed for this and other regex PRs. Thx! |
This makes the code a bit easier to read and smaller.
The capi crate was updated to the 2021 edition to avoid accidental
panic!
and other edge cases with inlined formats.Some of it was done with this command, and later fixed by hand: