Re: [PATCH] rust: clk: use the type-state pattern

From: Danilo Krummrich
Date: Wed Jul 30 2025 - 04:35:30 EST


On Wed Jul 30, 2025 at 9:29 AM CEST, Daniel Sedlak wrote:
> On 7/29/25 11:38 PM, Daniel Almeida wrote:
>> + /// An error that can occur when trying to convert a [`Clk`] between states.
>> + pub struct Error<State: ClkState> {
>
> Nit: IMO we mostly use the `where` variant instead of the colon.
>
> pub struct Error<State>
> where State: ClkState

For such simple struct definitions with just a single trait bound it's not very
common to use a where clause. I think the definition is fine as it is.