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

Add an unsafe method to convert CFDictionary to CFMutableDictionary #308

Merged
merged 1 commit into from Mar 29, 2019

Conversation

@jrmuizel
Copy link
Collaborator

jrmuizel commented Mar 28, 2019

This change is Reviewable

@jdm
Copy link
Member

jdm commented Mar 28, 2019

error[E0308]: mismatched types
  --> core-foundation/src/dictionary.rs:65:18
   |
64 |     pub unsafe fn to_mutable(&self) -> CFMutableDictionary<K, V> {
   |                                        ------------------------- expected `dictionary::CFMutableDictionary<K, V>` because of return type
65 |         unsafe { CFDictionary::wrap_under_get_rule(self.0) }
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `dictionary::CFMutableDictionary`, found struct `dictionary::CFDictionary`
   |
   = note: expected type `dictionary::CFMutableDictionary<K, V>`
              found type `dictionary::CFDictionary<_, _>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
error: Could not compile `core-foundation`.
@jrmuizel jrmuizel force-pushed the jrmuizel:to-mutable branch from 8a9fa3d to 87bd8a4 Mar 28, 2019
@jdm
Copy link
Member

jdm commented Mar 29, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Mar 29, 2019

📌 Commit 87bd8a4 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Mar 29, 2019

Testing commit 87bd8a4 with merge efb0d28...

bors-servo added a commit that referenced this pull request Mar 29, 2019
Add an unsafe method to convert CFDictionary to CFMutableDictionary

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

bors-servo commented Mar 29, 2019

☀️ Test successful - checks-travis
Approved by: jdm
Pushing efb0d28 to master...

@bors-servo bors-servo merged commit 87bd8a4 into servo:master Mar 29, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
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.