Re: [PATCH v3] hrtimer: add usage examples to documentation

From: Andreas Hindborg

Date: Mon Feb 23 2026 - 10:20:28 EST


Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx> writes:

> On Fri, Feb 20, 2026 at 9:12 AM Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>>
>> +//! prelude::*,
>
> The prelude should already be there in examples.
>
>> +//! sync::{
>> +//! atomic::{ordering, Atomic},
>> +//! completion::Completion,
>> +//! Arc,
>> +//! },
>> +//! time::{
>> +//! hrtimer::{
>> +//! RelativeMode, HrTimer, HrTimerCallback, HrTimerPointer,
>> +//! HrTimerRestart, HrTimerCallbackContext
>> +//! },
>> +//! Delta, Monotonic,
>> +//! },
>> +//! };
>
> This uses a mixture of the vertical style and the horizontal one -- I
> guess you did it to save on lines, but it looks strange now that we
> have a style for imports.

It uses random line breaks to make check_patch.pl not yell at me. I
guess I could copy them somewhere else, do the formatting and copy them
back. Not really a workflow I care for though.

> I guess you thought about it, but I wonder if the examples could be
> merged to some degree to make them more readable...

I don't think they would read better by combining them.

Best regards,
Andreas Hindborg