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

fix(decrypt): prevent extra clones while decrypting chunks #375

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

RolandSherwin
Copy link
Member

No description provided.

@RolandSherwin RolandSherwin requested a review from a team as a code owner December 18, 2023 18:58
@RolandSherwin RolandSherwin force-pushed the prevent_extra_clones branch 2 times, most recently from a557f96 to cfa0c1f Compare December 18, 2023 19:18
src/decrypt.rs Outdated
))
// we can pass &src_hashes since Rayon uses scopes under the hood which guarantees that threads are
// joined before src_hashes goes out of scope
let bytes = decrypt_chunk(c.index, c.content.clone(), &src_hashes)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

does this not work also? I dont see where c is being used after this?

Suggested change
let bytes = decrypt_chunk(c.index, c.content.clone(), &src_hashes)?;
let bytes = decrypt_chunk(c.index, c.content, &src_hashes)?;

@joshuef joshuef enabled auto-merge (rebase) December 19, 2023 08:43
@joshuef joshuef merged commit 9f77326 into maidsafe:master Dec 19, 2023
11 of 12 checks passed
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.

2 participants