From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C58426657B; Wed, 30 Jul 2025 08:29:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753864170; cv=none; b=TqkB3ZsQyXZz1ZJRF8pc/DLoQE2NWmseeFzR9nz6c9ABVs8KSXrLf1wWzE1setzKykuj8mQd6dA7ae8MdaKmwQa6mtuea0FgpP/D3x7ZDB5n1/Y8lQhUqr9l9L5v66XmbJ93247qJYK9wFew623U2UhnmDjkATk3HdLSIvRpX7Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753864170; c=relaxed/simple; bh=Rg10b4JNCmDsD0iq5OysxPQp6E6bCpSKW+A6zmsmiwQ=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=iIWbyo9bpj990YO4HGgC/HBg2QrYzhwZfhGqigSfvtvN2kYuC+TK29eBswFqYAtcdn6spX8VGZ0qoHOaCV9TqfMKH/hav1uP6XR4h9k/dZj8NNUpKcP+B57lwUTYqqFCKXoIUS79XHfWfNKGrOREJvWR2sHRdHKXSRPhnVZhTH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WILiZVJ3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WILiZVJ3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47595C4CEE7; Wed, 30 Jul 2025 08:29:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753864169; bh=Rg10b4JNCmDsD0iq5OysxPQp6E6bCpSKW+A6zmsmiwQ=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=WILiZVJ3JC5fOeTWv/GCr1BzfmOPciUU9DM62CqChBO/pQpSt/ARfuPYzAsCcN36F WlAgaZ6a462uaTbjV1hKYpOS07RELFpL4ckb/KMNrlJNhvM3hwJ72OqPG4dDawpJzR 4qAY4yjOcIS/exu5h/0zu1UUoQJgki1+zTBnY53b+g13PoWS8/67OIzrg3AGjFUPsu ViYsw9/obD3d7Y9ug4nw2UrjSuZp6JbOh8JmH0LYxnPftZV5Q0KTrPgJa0lR6ZIq9u ASoCPDxqlFTp2iZADwabn/wqBVTeWCYbMnloegZoMCgmv7RTrgrshjQW8VG7L3XnMD H2AT8Jl5PHNig== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 30 Jul 2025 10:29:24 +0200 Message-Id: Subject: Re: [PATCH] rust: clk: use the type-state pattern Cc: "Daniel Almeida" , "Michael Turquette" , "Stephen Boyd" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Rafael J. Wysocki" , "Viresh Kumar" , "Alexandre Courbot" , , , , To: "Daniel Sedlak" From: "Danilo Krummrich" References: <20250729-clk-type-state-v1-1-896b53816f7b@collabora.com> In-Reply-To: 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`] betwee= n states. >> + pub struct Error { > > Nit: IMO we mostly use the `where` variant instead of the colon. > > pub struct Error > 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.