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

Clean up the code

Open bors-servo opened this issue 7 years ago • 1 comments

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:

  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.

bors-servo avatar Feb 01 '18 21:02 bors-servo

Comment by nox Tuesday Apr 04, 2017 at 16:11 GMT


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

bors-servo avatar Feb 01 '18 21:02 bors-servo