Re: [PATCH v3 04/13] rust: hrtimer: implement `TimerPointer` for `Arc`

From: Daniel Almeida
Date: Fri Nov 22 2024 - 11:25:43 EST


Hi everyone,

> On 22 Nov 2024, at 09:36, Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Wed, Nov 20, 2024 at 4:52 PM Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>>
>> No particular reason. It is often easier to rebase things around when
>> they are on their own line.

I do agree. You get way fewer conflicts this way.

IMHO, imports_granularity=item and group_imports=StdExternalCrate would make things
a bit more tidy.

>>
>> Are there any code guidelines to follow on this?
>
> Not yet -- we have a mixture of styles, though we typically don't go
> to the item-level like in this patch, and instead have done it closer
> to the "Crate" or "Module" styles.
>
> Ideally we would automate at least to some degree, but currently the
> relevant `rustfmt` options are unstable:
>
> https://rust-lang.github.io/rustfmt/#imports_indent
> https://rust-lang.github.io/rustfmt/#imports_layout
> https://rust-lang.github.io/rustfmt/#imports_granularity
> https://rust-lang.github.io/rustfmt/#group_imports

This is a bit unfortunate indeed.

>
> I agree that deciding on one style would be nice (especially if it is
> reasonable to expect that the style would be eventually supported by
> `rustfmt`).
>
> Cheers,
> Miguel
>

— Daniel