rust-ffmpeg icon indicating copy to clipboard operation
rust-ffmpeg copied to clipboard

Implement support for non-exhaustive enums

Open FreezyLemon opened this issue 3 years ago • 2 comments

This PR requires this ffmpeg-sys-next PR to be merged first.

This PR adds the feature "non-exhaustive-enums" as requested in zmwangx/rust-ffmpeg-sys#46. This allows users to compile the ffmpeg-next crate(s) even when their locally installed FFmpeg dev files are newer than the target version.

Disabling the feature can be useful for library devs when updating ffmpeg-next to a newer version of FFmpeg. By disabling it, the compiler will error on enum matches that don't handle all enum values (making it harder to miss new enum values)

I think including this as a default feature is useful.

FreezyLemon avatar Oct 22 '22 15:10 FreezyLemon

@Polochon-street @zmwangx Excuse the ping, but I think this one of the simpler PRs that will help a lot of users living on the bleeding edge (mostly Arch users). I'd really appreciate some response so we can get this merged before the next release.

FreezyLemon avatar Nov 16 '22 00:11 FreezyLemon

Making a note that this would resolve #126

ThatNerdUKnow avatar Jan 24 '23 05:01 ThatNerdUKnow

This PR has been collecting dust for a while now. I'm closing because it doesn't seem likely to be merged and would need to be rebased/updated, which I'm not willing to do if it's just going to get ignored again.

If you're still interested in a solution to this problem, I'm sorry to say there's not much to do except using a fork of this project. I've switched to shssoichiro/ffmpeg-the-third which is more responsive to contributions but also "behind" in terms of keeping up with upstream ffmpeg.

FreezyLemon avatar Sep 04 '24 13:09 FreezyLemon