Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Clean up the code #81

Open
daniel-abramov opened this issue Apr 4, 2017 · 1 comment
Open

Clean up the code #81

daniel-abramov opened this issue Apr 4, 2017 · 1 comment

Comments

@daniel-abramov
Copy link
Contributor

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.
@nox
Copy link
Contributor

nox commented Apr 4, 2017

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

bors-servo pushed a commit that referenced this issue Oct 2, 2017
Use foreign types crate

As suggested in #81, changed TCFType boilerplate to foreign-types.

<!-- 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-graphics-rs/92)
<!-- Reviewable:end -->
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants