You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The enum in the wayland protocol could have duplicated items, advertising only different names.
Right now wayland scanner is not handling them, but I don't think there's a protocol in the wild using such a thing, so it's not an issue now, but it could be with the upcoming color management protocols.
The solution is simple and non-breaking, you should do something like:
#[repr(u32)]#[derive(PartialEq,Eq)]enumFoo{X = 1,B = 2,}implFoo{// TODO: The same values should go into the `impl`.//// This is what should be emitted from the wayland-scanner.pubconstC:Foo = Self::B;}fnmain(){let z = Foo::C;match z {Foo::C => {}Foo::B => {}Foo::X => {}}println!("{}",Foo::Xasu32);}
The text was updated successfully, but these errors were encountered:
@i509VCB by order? Since the goal simply to include all of them in some way. The point is not in matching in the first place, but having a value. The thing is that arbitrary wayland enum can look like that and what I propose is non-breaking change.
The
enum
in the wayland protocol could have duplicated items, advertising only different names.Right now wayland scanner is not handling them, but I don't think there's a protocol in the wild using such a thing, so it's not an issue now, but it could be with the upcoming color management protocols.
The solution is simple and non-breaking, you should do something like:
The text was updated successfully, but these errors were encountered: