Peternator7 / strum

A small rust library for adding custom derives to enums
https://crates.io/crates/strum
MIT License
1.8k stars 152 forks source link

Handle rustoc comments in `#[derive(FromRepr)]` #276

Closed smoelius closed 1 year ago

smoelius commented 1 year ago

I think this fixes #275, but please scrutinize.

smoelius commented 1 year ago

It looks like the same failures occurred on master, so I assume they are not caused by this change: https://ci.appveyor.com/project/Peternator7/strum/builds/47333125

Please let me know if that is not correct.

Peternator7 commented 1 year ago

Hey @smoelius, thanks for tackling this. I'll take a closer look at the logic, but what immediately jumps out is that let-else is too new a feature for strum. It's great for brevity for sure, but for back-compat, we'll need to use an if let {} else {} to not break older rust versions.

I also have a PR to fix the CI to the proper msrv. After that merges, you should be able to rely on the builds again. Sorry about that.

smoelius commented 1 year ago

let-else is too new a feature for strum.

:facepalm: This should have occurred to me, given https://github.com/Peternator7/strum/pull/261#issuecomment-1537230542.