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

Avoid clone in layer #2973

Merged
merged 2 commits into from
Oct 10, 2024
Merged

Avoid clone in layer #2973

merged 2 commits into from
Oct 10, 2024

Conversation

yanns
Copy link
Collaborator

@yanns yanns commented Oct 10, 2024

Part of #2865

The first commit introduces a test to cover the state cloning
The second commit removes one clone

@@ -924,6 +925,26 @@ async fn state_isnt_cloned_too_much() {
assert_eq!(state.count(), 3);
}

#[crate::test]
async fn state_isnt_cloned_too_much_in_layer() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if it's the right place to put this test

Copy link
Member

Choose a reason for hiding this comment

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

Fine by me.

@@ -924,6 +925,26 @@ async fn state_isnt_cloned_too_much() {
assert_eq!(state.count(), 3);
}

#[crate::test]
async fn state_isnt_cloned_too_much_in_layer() {
Copy link
Member

Choose a reason for hiding this comment

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

Fine by me.

@yanns yanns merged commit af95794 into main Oct 10, 2024
18 checks passed
@yanns yanns deleted the avoid_clone_in_layer branch October 10, 2024 20:29
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.

3 participants