Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
run: |
nix develop -c cargo run --features=option --features=merge --example option
nix develop -c cargo run --features=merge --example op
nix develop -c cargo test --features=merge --no-default-features
nix develop -c cargo test --features=merge

- name: Test with option features
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [

[workspace.package]
authors = ["Antonio Yang <yanganto@gmail.com>"]
version = "0.9.3"
version = "0.9.4"
edition = "2021"
categories = ["development-tools"]
keywords = ["struct", "patch", "macro", "derive", "overlay"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ This crate also includes the following optional features:
- `status`(default): implements the `Status` trait for the patch struct, which provides the `is_empty` method.
- `op` (default): provide operators `<<` between instance and patch, and `+` for patches
- default: when there is a field conflict between patches, `+` will add together if the `#[patch(addable)]` or `#[patch(add=fn)]` is provided, else it will panic.
- `merge` (optional): implements the `Merge` trait for the patch struct, which provides the `merge` method, and `<<` between patches.
- `merge` (optional): implements the `Merge` trait for the patch struct, which provides the `merge` method, and `<<` (if `op` feature enabled) between patches.
- `std`(optional):
- `box`: implements the `Patch<Box<P>>` trait for `T` where `T` implements `Patch<P>`.
This let you patch a boxed (or not) struct with a boxed patch.
Expand Down
2 changes: 1 addition & 1 deletion struct-patch-derive/src/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl Patch {
}
};

#[cfg(feature = "merge")]
#[cfg(all(feature = "op", feature = "merge"))]
let op_impl = quote! {
impl #generics core::ops::Shl<#name #generics> for #struct_name #generics #where_clause {
type Output = Self;
Expand Down
2 changes: 1 addition & 1 deletion struct-patch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license.workspace = true
readme.workspace = true

[dependencies]
struct-patch-derive = { version = "=0.9.3", path = "../struct-patch-derive" }
struct-patch-derive = { version = "=0.9.4", path = "../struct-patch-derive" }

[dev-dependencies]
serde_json = "1.0"
Expand Down