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

lang: use phantomdata in account type instead of '_account: T' #1155

Merged

Conversation

paul-schaaf
Copy link
Contributor

fixes #1140

@paul-schaaf paul-schaaf marked this pull request as ready for review December 16, 2021 22:49
let mut empty = &[][..];
Ok(Program::new(
info.clone(),
T::try_deserialize(&mut empty)?,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this trait bound and the associated implementations as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Deserialize trait bound for T?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the dex struct also implements AccountSerialize. Was that intentional?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a mistake. Can remove that too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@armaniferrante armaniferrante merged commit 22c2c30 into coral-xyz:master Dec 27, 2021
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

Successfully merging this pull request may close these issues.

lang: adjust program account to use PhantomData to indicate that its generic is not used in its field
2 participants