On Fri, Aug 21, 2015 at 4:40 AM, Ms2ger <ms2...@gmail.com> wrote: >> >> You're talking about `use` items, right? It looks like they're >> sorted within each group, but you can still have separate groups. >> (Where the boundary between a group is a blank line.) Is that >> right? > > That's correct.
Unfortunately the group ordering is inconsistent and sometimes wrong. For example, in some files it goes: - imports from this crate - imports from other Servo crates - imports from non-Servo crates - imports from built-in crates Which is easy to get wrong, especially for part-time contributors (like myself) who don't have a clear idea which crates are in which group. For example, the very first file I looked in was components/script/script_task.rs, and it has *five* import groups, with the fifth one containing some |hyper| imports that should be with the other |hyper| imports in the third group. The second file I looked at was components/layout/layout_task.rs which only has two groups. I *think* the grouping is as follows: - imports from this crate - all other imports But I can't tell for sure. Rust as a language avoids so many of these silly, arbitrary decision points; it's a shame that Servo has found a place to introduce one. Especially given that import lists are modified frequently, so the question of "where does this new import get inserted" comes up frequently. I'd argue for "all one group" unless test-tidy can be made to check more complex rules. Nick _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo