Skip to content

Commit

Permalink
test: Shl with option and nested
Browse files Browse the repository at this point in the history
  • Loading branch information
taorepoara committed Aug 14, 2024
1 parent 4cc9075 commit 2404149
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions struct-patch/examples/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn pure_none_feature() {
fn from(patch: AddressPatch) -> Self {
let mut address = Address {
street: None,
country: "France".to_string(),
country: "Italy".to_string(),
};
address.apply(patch);
address
Expand All @@ -43,7 +43,7 @@ fn pure_none_feature() {

patch.address = Some(Some(AddressPatch {
street: Some(Some("Av. Gustave Eiffel, 75007 Paris".to_string())),
country: None,
country: Some("France".to_string()),
}));

let mut next_patch: UserPatch = User::new_empty_patch();
Expand All @@ -52,7 +52,7 @@ fn pure_none_feature() {
country: None,
}));

let patched_user = user << patch << next_patch;
let patched_user = user << (patch << next_patch);

assert_eq!(
patched_user,
Expand Down

0 comments on commit 2404149

Please sign in to comment.