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

Unnecessary cloning in perform_annotated_read_operation #6753

Closed
jdm opened this issue Jul 25, 2015 · 2 comments
Closed

Unnecessary cloning in perform_annotated_read_operation #6753

jdm opened this issue Jul 25, 2015 · 2 comments
Labels
A-content/dom Interacting with the DOM from web content E-less-complex Straightforward. Recommended for a new contributor.

Comments

@jdm
Copy link
Member

jdm commented Jul 25, 2015

let blobtype = read_data.blobtype.clone();
let label = read_data.label.clone();

There's no need for this cloning, since we're just moving the values immediately. I think we can just remove the variables entirely and use readdata.whatever when necessary.

Code: components/script/dom/filereader.rs

@jdm jdm added A-content/dom Interacting with the DOM from web content E-less-complex Straightforward. Recommended for a new contributor. labels Jul 25, 2015
@farodin91
Copy link
Contributor

By closing the issue #6768, i think, this also closed.

@farodin91
Copy link
Contributor

Will do this.

farodin91 added a commit to farodin91/servo that referenced this issue Aug 5, 2015
bors-servo pushed a commit that referenced this issue Aug 6, 2015
Remove Unnecessary Code in FileReader #6753

@jdm r?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7001)
<!-- Reviewable:end -->
@jdm jdm closed this as completed Aug 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content E-less-complex Straightforward. Recommended for a new contributor.
Projects
None yet
Development

No branches or pull requests

2 participants