Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2815315rwb; Fri, 2 Dec 2022 15:50:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf5sPMUJX0BD3gfnZrIBbax+HwVMpiKeG5zBGGv20Pq5E0t6On3F1qNSBx1IJENWpMd86nlK X-Received: by 2002:a05:6402:100b:b0:461:f1c6:1f22 with SMTP id c11-20020a056402100b00b00461f1c61f22mr52577107edu.95.1670025056598; Fri, 02 Dec 2022 15:50:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670025056; cv=none; d=google.com; s=arc-20160816; b=xCDexIq/iRWKm6fkp6oP+V7L0C30rwFkFPZlNzNyTH3DyFnadbAQKrzFh15kBZtHPc b15wRgHFzy6IjE0ODM6fPCDbAuEMXcGJOcJwL1tdVn4KwHe0Rqx6fn/LAH/R1UKFORFW zjhCqTu0OX8X3iJtrmtIQ68ZXgEgUagfe5lBm1s2wzP0W6t294M5VRVGLm47a+4qdMFJ KmOcKPSrjp2k5UjY98edutioKca6+WVfRxLxJuYtNc5ak1uCFCxEqlPdxb4fNT+oe1eb Dd0HSjNQRVAdUvA0EqhwS9WamG3ML5W+/N3yhtIyEwyB9+x1/pAdp397LteZDLPa1Lt2 xkRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=yxT7HiP0z6PnQ571PxQPFu/NQAI3ieVo9QcKWIVPNaY=; b=nU+JlGbOthvre0XI6EBXiy65q9Bu26+xQKpRKd6Zd3Jc5n4z3gltifRwPKQBeosPoZ +Wb7T9qofoCKYCGRHUuMVHhfkwpBFt3dLmmmhbL1ymwXTMd8Wy/NvRTcQSFheQjtskrH yG8TTGF/o6RI/xpmsFsvjmElksCXaoGwXaNHLKn7ABm6M5qkwy8ttEyeOPKIkBFzspxx M0XXiPQ84peam0ZS6C3AmTLxHm1vqv3FT22kLxfehst8SSuTaXxte85dQLbQ0owhme6m 5FzKp3KC7/uKv4DYXFsRqlnsf7pc0AODIRlWFN4L6oNmssiAF+ebEH/yOK4ddS+htdSR d+DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joshtriplett.org header.s=fm3 header.b=yBQsZRxe; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=KiA9VVRL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk12-20020a1709077f8c00b0078bcc872a6esi7154998ejc.360.2022.12.02.15.50.35; Fri, 02 Dec 2022 15:50:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@joshtriplett.org header.s=fm3 header.b=yBQsZRxe; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=KiA9VVRL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233308AbiLBXmK (ORCPT + 84 others); Fri, 2 Dec 2022 18:42:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234685AbiLBXmI (ORCPT ); Fri, 2 Dec 2022 18:42:08 -0500 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25477ECA21; Fri, 2 Dec 2022 15:42:06 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 37A6232007D7; Fri, 2 Dec 2022 18:42:02 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 02 Dec 2022 18:42:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= joshtriplett.org; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1670024521; x= 1670110921; bh=yxT7HiP0z6PnQ571PxQPFu/NQAI3ieVo9QcKWIVPNaY=; b=y BQsZRxe+jKL9ygzmShsmMjLR1wogByCB42nEcbzwc3ogTNmLjcb14HIW6/IpCuuz /zarw10mAOt/Hz1WYVNViEfpD9PU19KCXZJPS7v5In486WdgCPt2hd5d+1qWLF34 72fOmIOa1l1STZfu1XWBQd6R/AvWDHdHk01DzWEERajAxn9j7lhJN4gSXpyWhocw SIQI5y4QS3FSxC32Cb1hGkDnZoIUgtvfv6l/J5NW7XM/b1f3cgsfpKl8Tt/ErY4N ldcxTa65hQjwdTLumFaQ5I1rTInppkxCFdW1Z99WFp13r47vtPKw0H7uyNqJLn/0 BGaNvGJ3AjFJQEeQVIUsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1670024521; x=1670110921; bh=yxT7HiP0z6PnQ571PxQPFu/NQAI3 ieVo9QcKWIVPNaY=; b=KiA9VVRLK3HOjYjDlUzTuRq57Duc2zEq9XTkNOTfQaXJ K0VJJ0icSrbMM0BJ6o2+ZZIEeZrNc1NyCAD+iQKnIxyQLzcM2FhE8SpMydo6EB57 Z71vCWaMcCmnSahY7RC1+HUq2ZAIOfHtTIgUyG0UL/+WTTlZEQql5qwm7hKd2zFc qH3fhds7DrVNDSd3W6aCh4RCRdw66CzDiDOs2Co3ah7bk83PWVZ/rMb8e52IEOOW PuuDb4FNmLOq3ykSFpGX3VbO6ePWSHEy5yXkT8PHaSatCcuysoi6oOX5mcopUHp+ ndOXZXO3BAC++XloqgtQU12Ds9HHgkHroFT7IMPvzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdelgddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeflohhshhcu vfhrihhplhgvthhtuceojhhoshhhsehjohhshhhtrhhiphhlvghtthdrohhrgheqnecugg ftrfgrthhtvghrnhepudeigeehieejuedvtedufeevtdejfeegueefgffhkefgleefteet ledvtdfftefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepjhhoshhhsehjohhshhhtrhhiphhlvghtthdrohhrgh X-ME-Proxy: Feedback-ID: i83e94755:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Dec 2022 18:42:00 -0500 (EST) Date: Fri, 2 Dec 2022 15:41:59 -0800 From: Josh Triplett To: ojeda@kernel.org Cc: Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Wei Liu Subject: Re: [PATCH v2 27/28] rust: types: add `Either` type Message-ID: References: <20221202161502.385525-1-ojeda@kernel.org> <20221202161502.385525-28-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221202161502.385525-28-ojeda@kernel.org> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 02, 2022 at 05:14:58PM +0100, ojeda@kernel.org wrote: > From: Wedson Almeida Filho > > Introduce the new `types` module of the `kernel` crate with > `Either` as its first type. > > `Either` is a sum type that always holds either a value > of type `L` (`Left` variant) or `R` (`Right` variant). > > For instance: > > struct Executor { > queue: Either, > } This specific example seems like it would be better served by the existing `Cow` type.