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

impl Clone for Buffer #111

Merged
merged 1 commit into from May 17, 2018
Merged

impl Clone for Buffer #111

merged 1 commit into from May 17, 2018

Conversation

@mbrubeck
Copy link
Contributor

mbrubeck commented May 17, 2018

This change is Reviewable

@waywardmonkeys
Copy link
Collaborator

waywardmonkeys commented May 17, 2018

@bors-servo
Copy link
Contributor

bors-servo commented May 17, 2018

📌 Commit 4495868 has been approved by waywardmonkeys

@bors-servo
Copy link
Contributor

bors-servo commented May 17, 2018

Testing commit 4495868 with merge 9600fd2...

bors-servo added a commit that referenced this pull request May 17, 2018
impl Clone for Buffer

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-harfbuzz/111)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented May 17, 2018

☀️ Test successful - status-travis
Approved by: waywardmonkeys
Pushing 9600fd2 to master...

@bors-servo bors-servo merged commit 4495868 into servo:master May 17, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
bors-servo added a commit that referenced this pull request May 19, 2018
Remove Clone impls for Buffer and Blob

Reverts #111.

I realized that allowing these types to be cloned makes it impossible to provide safe borrowed access to their contents, because one handle could mutate or clear the contents while they are borrowed through another handle.

Rust code that needs multiple pointers to a single buffer or blob should use Rc/Arc or `&T` instead.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-harfbuzz/113)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.