Skip to content

Commit

Permalink
changed to removed option for serialization feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce0203 committed Nov 30, 2024
1 parent db8d841 commit 1b81389
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ serialization = { git = "https://github.com/Bruce0203/serialization" }

[dependencies]
packetize_derive = { path = "./impl", version = "0.100.0" }
serialization = { workspace = true, optional = true }
serialization = { workspace = true }

[features]
default = ["serialization"]
serialization = ["dep:serialization"]
serialization = []

[[bench]]
name = "bench"
Expand Down
4 changes: 2 additions & 2 deletions impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fn generate_by_bound(packet_stream: &PacketStream, bound: Bound) -> proc_macro2:
Some(quote! { #[repr(u32)] })
};
let packets_enum = quote! {
#[cfg_attr(feature = "serialization", derive(serialization::Serializable))]
#[derive(serialization::Serializable)]
#repr_attr
#vis enum #state_packets_name {
#(#state_bound_packet_paths(#state_bound_packet_paths) #state_bound_packet_ids,)*
Expand Down Expand Up @@ -171,7 +171,7 @@ fn generate_by_bound(packet_stream: &PacketStream, bound: Bound) -> proc_macro2:
quote! {
#(#state_quotes)*

#[cfg_attr(feature = "serialization", derive(serialization::Serializable))]
#[derive(serialization::Serializable)]
#vis enum #bound_packet_ident {
#(#bound_packets_path(#bound_packets_path),)*
}
Expand Down

0 comments on commit 1b81389

Please sign in to comment.