core-foundation-rs
core-foundation-rs copied to clipboard
Clean up the code
Issue by application-developer-DA
Tuesday Apr 04, 2017 at 16:07 GMT
Originally opened as https://github.com/servo/core-graphics-rs/issues/81
I've noticed several problems when worked with the code:
- Some inconsistencies in coding style: the order of
use
statements varies between files (it would be better to use the same style / order everywhere; one of the possible styles). - When multiple functions/structures/types are imported from the module, both
use something::{str1, test, example}
anduse something::{ str1, test, example }
styles are used, it would be nice to stick to one of the versions. - Sometimes the text width is more than 100 characters.
- There is a lot of boilerplate code in each module when it comes to
TCFType
trait implementation. I think it makes sense to useimpl_TCFType!
macro fromcore-foundation-sys
or something similar.
Comment by nox
Tuesday Apr 04, 2017 at 16:11 GMT
We should probably use @sfackler's foreign-types
crate.