[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DBP8YI8BA4PL.RG9D2ZL8SBR5@kernel.org>
Date: Wed, 30 Jul 2025 10:29:24 +0200
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Daniel Sedlak" <daniel@...lak.dev>
Cc: "Daniel Almeida" <daniel.almeida@...labora.com>, "Michael Turquette"
<mturquette@...libre.com>, "Stephen Boyd" <sboyd@...nel.org>, "Miguel
Ojeda" <ojeda@...nel.org>, "Alex Gaynor" <alex.gaynor@...il.com>, "Boqun
Feng" <boqun.feng@...il.com>, "Gary Guo" <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>, "Benno Lossin"
<lossin@...nel.org>, "Andreas Hindborg" <a.hindborg@...nel.org>, "Alice
Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>, "Rafael
J. Wysocki" <rafael@...nel.org>, "Viresh Kumar" <viresh.kumar@...aro.org>,
"Alexandre Courbot" <acourbot@...dia.com>, <linux-clk@...r.kernel.org>,
<rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-pm@...r.kernel.org>
Subject: Re: [PATCH] rust: clk: use the type-state pattern
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.
Powered by blists - more mailing lists