Various fixes and rearrangements #145
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A couple of things that I found easy to do that would improve the readability and usability of the crate in various ways. Some might be more subjectively better rather than objectively better. I clogged some unrelated changes into the same PR since the merge process takes ages with Travis being this slow. Anyway, they all fit under the "cleanup" category :) Tell me if you want them split into multiple PRs.
Export the sys part of the error module. All other modules do this. I guess it was missed?
Fix so the macros are usable from other crates without having to depend on
core-foundation-sys
or importCFRelease
into the scope where they are used.The tests in
lib.rs
were only testing the dictionary implementations, so I moved them todictionary.rs
I found it a bit undiscoverable that
CFRunLoopSource
define a method inside offiledescriptor.rs
. At the same time it's not ideal to call the ffi-methods of the filedescriptor from runloop.rs. This rearrangement solves both of those problems by exposingCFFileDescriptor::to_run_loop_source
that can be used fromrunloop.rs
.This change is