Skip to content

Commit

Permalink
fix: enum case is not enough
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Nov 29, 2024
1 parent 9526ddc commit cea6907
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ authors = [
"Aakash Sen Sharma <[email protected]>",
]
edition = "2021"
version = "0.11.0-rc1"
version = "0.11.0-rc2"
license = "MIT"
repository = "https://github.com/waycrate/exwlshelleventloop"
description = "Wayland extra shell lib"
keywords = ["wayland", "wlroots"]
readme = "README.md"

[workspace.dependencies]
layershellev = { version = "0.11.0-rc1", path = "./layershellev" }
sessionlockev = { version = "0.11.0-rc1", path = "./sessionlockev" }

iced_layershell = { version = "0.11.0-rc1", path = "./iced_layershell" }
iced_layershell_macros = { version = "0.11.0-rc1", path = "./iced_layershell_macros" }
iced_sessionlock = { version = "0.11.0-rc1", path = "./iced_sessionlock" }
iced_sessionlock_macros = { version = "0.11.0-rc1", path = "./iced_sessionlock_macros" }
waycrate_xkbkeycode = { version = "0.11.0-rc1", path = "./waycrate_xkbkeycode" }
layershellev = { version = "0.11.0-rc2", path = "./layershellev" }
sessionlockev = { version = "0.11.0-rc2", path = "./sessionlockev" }

iced_layershell = { version = "0.11.0-rc2", path = "./iced_layershell" }
iced_layershell_macros = { version = "0.11.0-rc2", path = "./iced_layershell_macros" }
iced_sessionlock = { version = "0.11.0-rc2", path = "./iced_sessionlock" }
iced_sessionlock_macros = { version = "0.11.0-rc2", path = "./iced_sessionlock_macros" }
waycrate_xkbkeycode = { version = "0.11.0-rc2", path = "./waycrate_xkbkeycode" }

tempfile = "3.14.0"
thiserror = "1.0.69"
Expand Down
6 changes: 4 additions & 2 deletions iced_layershell_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ pub fn layer_singleton(input: TokenStream) -> TokenStream {
// Check if the variant has the `#[singleton]` attribute
let is_singleton = variant.attrs.iter().any(is_singleton_attr);

quote! {
Self::#variant_name => #is_singleton,
match &variant.fields {
syn::Fields::Unit => quote! { Self::#variant_name => #is_singleton, },
syn::Fields::Unnamed(_) => quote! { Self::#variant_name(..) => #is_singleton, },
syn::Fields::Named(_) => quote! { Self::#variant_name { .. } => #is_singleton, },
}
});

Expand Down

0 comments on commit cea6907

Please sign in to comment.