core-graphics-rs icon indicating copy to clipboard operation
core-graphics-rs copied to clipboard

Clean up the code

Open daniel-abramov opened this issue 8 years ago • 1 comments

I've noticed several problems when worked with the code:

  1. 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).
  2. When multiple functions/structures/types are imported from the module, both use something::{str1, test, example} and use something::{ str1, test, example } styles are used, it would be nice to stick to one of the versions.
  3. Sometimes the text width is more than 100 characters.
  4. There is a lot of boilerplate code in each module when it comes to TCFType trait implementation. I think it makes sense to use impl_TCFType! macro from core-foundation-sys or something similar.

daniel-abramov avatar Apr 04 '17 16:04 daniel-abramov

We should probably use @sfackler's foreign-types crate.

nox avatar Apr 04 '17 16:04 nox