qemu-rust
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 06/10] rust: add bindings for timer


From: Zhao Liu
Subject: Re: [PATCH 06/10] rust: add bindings for timer
Date: Sat, 8 Feb 2025 19:08:56 +0800

> Please keep init_full(); init() would be a version without some of the
> arguments (e.g. the TimerListGroup, or the attributes).

Done.

...

> > > > +        scale: u32,
> 
> While at it, can you add constants for the scale, i.e.
> 
>     pub const NS: u32 = bindings::SCALE_NS;
>     pub const US: u32 = bindings::SCALE_US;
>     pub const MS: u32 = bindings::SCALE_MS;
> 
> ? Using Timer::NS is clear enough and removes the need to import from
> "bindings".  At least in theory, bindings should not even have to be "pub"
> (or at least that's where the code should move towards).

Great! I realized this case, too.

Thanks,
Zhao




reply via email to

[Prev in Thread] Current Thread [Next in Thread]