Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializing None doesn't remove the key/value from the registry #76

Open
gentoo90 opened this issue Jan 8, 2025 · 0 comments
Open

Serializing None doesn't remove the key/value from the registry #76

gentoo90 opened this issue Jan 8, 2025 · 0 comments

Comments

@gentoo90
Copy link
Owner

gentoo90 commented Jan 8, 2025

let v1 = Rectangle {
    coords: Some(Coords { x: 55, y: 77 }),
    size: Size { w: 500, h: 300 },
};
key.encode(&v1).unwrap();

let v2 = Rectangle {
    coords: None,
    size: Size { w: 500, h: 300 },
};
key.encode(&v2).unwrap();

let v3: Rectangle = key.decode().unwrap();
assert_eq!(v3, v2); 
assertion `left == right` failed
  left: Rectangle { coords: Some(Coords { x: 55, y: 77 }), size: Size { w: 500, h: 300 } }
 right: Rectangle { coords: None, size: Size { w: 500, h: 300 } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant