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

feat(versionable): impl Versionize for Vec<Vec<T>> #1609

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

nsarlin-zama
Copy link
Contributor

@nsarlin-zama nsarlin-zama commented Sep 30, 2024

closes: https://github.com/zama-ai/tfhe-rs-internal/issues/749

PR content/description

The versioning of Vec has a shortcut for rust native type (that implement NotVersioned). The goal of this shortcut is to avoid to do call "versionize" on each element of an integer vector and clone it.

This is implemented via the VersionizeVec trait. VersionizeVec has a blanket impl for T: NotVersioned but should be manually implemented for other types.

The #[derive(Versionize)] proc macro implements it, but it was not implemented for Vec<T>. Due to the "conflicting implementation" rule of the rust compiler, this is at the price of the shortcut impl for Vec<Vec<T: NotVersioned>>

@cla-bot cla-bot bot added the cla-signed label Sep 30, 2024
@nsarlin-zama nsarlin-zama merged commit 04c6f18 into main Oct 1, 2024
88 checks passed
@nsarlin-zama nsarlin-zama deleted the ns/versionize_vec_vec branch October 1, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants