Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5605484rwb; Mon, 14 Nov 2022 07:04:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf74vek+mYXdEAh4iFPuzZzMaZw4idHIfZIiVqt+HneR3dyy1YdnptSjeMXHl4FlPsiWTKOa X-Received: by 2002:a17:906:3e05:b0:78d:aaf9:7b8c with SMTP id k5-20020a1709063e0500b0078daaf97b8cmr10839233eji.229.1668438286742; Mon, 14 Nov 2022 07:04:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668438286; cv=none; d=google.com; s=arc-20160816; b=ega7YtCEJEbWYVmB6QB2t3BDMnbfLHcykgIpjoqvkZ8vyab5DH1NJkmGQjhLQyskiX UAzyOcv4iDXRIHAnDxLqc3rG4gbJukihAuzIZchnYNUselNi9Q1qvG6i952lcefAnUgC +wP5H6UTYIb/maRxRw39KEguxzu4o42CJ8dkUGlH5PvLSsIIeq5Fj2hJm+92kmIa1mkh yTWLIVLkEZR3lZCz1aCGiaZfyio/8bRdJBnCBVcJbPJY7VU+Ez8UrHVFXpyvD5AA1DJW ASGGyD0f3Y1Xhr20/C9YBEtP7m9Z+qpKfRekbv5zDYeVH2UkygKzIJdKwHF04rJwW6jE wX8Q== 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; bh=YCY5hqYU1SfTXWjQyYMV6/iKq7L1yppgMWYjdS1kJoY=; b=ihD/3JsFMkGdRqSUnUAvPLtqch0Qh9VuoYmgW1or3S/+ycGL4gLg45h3vXPasXJsjC JtnDffnTYQSlrF2j4yMWB18MheapVmBbool1ZcokFVVlCAPog51VJi0zhRFfpyYv3drc 0fYucAlP/S1ce57xIw9Pw5Itr2VUzE9RokED+KWQ+jtjSsx5p60VMd9nsQoNEKofoLtB EWrw8x1Vh1tv36Q89vOn3Lu+9zliKora9XxYnjP0FFlOEuIuF/FM0zVptF9Su74rd0Rp PNoTd10hmpfYCInIMEUAyznyjUpdUrs3m+0ueuGU40qGbIShW/swgPHNpwoFDcyj5TRq SIKQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr4-20020a170907720400b007ae86742c3bsi9088260ejc.1009.2022.11.14.07.04.00; Mon, 14 Nov 2022 07:04:46 -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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236587AbiKNOdH (ORCPT + 87 others); Mon, 14 Nov 2022 09:33:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237135AbiKNOcs (ORCPT ); Mon, 14 Nov 2022 09:32:48 -0500 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 842032A712; Mon, 14 Nov 2022 06:32:47 -0800 (PST) Received: by mail-wr1-f52.google.com with SMTP id w14so18584808wru.8; Mon, 14 Nov 2022 06:32:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YCY5hqYU1SfTXWjQyYMV6/iKq7L1yppgMWYjdS1kJoY=; b=zUd/BDFZ6QSuYffmaraR6cXXQGnPRFJpP9ZLqdGBz00W6pm97vWTOYiovBgt0Gs38a xcgfqfdoK9N96zTTE+SS4ARAGfbRBURBIsVroLTBtMzzxcfSqy+plOGinVHV8ByRXjXk ZpbOtrGK1cFEjEGAqpLLfC+zneFixUZQPH70aPVitCD2FsaTBPu4weRIafrF7HL3+yHZ szu4mWHBkOk+Utx2k6J6oYOeJWtK+42eB6j4OHVALSTb5qOHIzn/qQX4aWrvFrEQeFvz QOIbTvk9j911zVSClnIIP5e4XRR6lBtreD6FUmdFZo94y8t/X9j0lneCK4Lug4I1zWvy xJ7g== X-Gm-Message-State: ANoB5pnJ8k7u4bXxs/ggEFoWiVhNgSGsv4npNGdzfJOU7QJlLDvpnzgF XdaCedlXJWc3HoEq/+ONzUQ= X-Received: by 2002:adf:f342:0:b0:236:57cf:1b6f with SMTP id e2-20020adff342000000b0023657cf1b6fmr7859753wrp.153.1668436365814; Mon, 14 Nov 2022 06:32:45 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id g4-20020a5d4884000000b002383e977920sm9651659wrq.110.2022.11.14.06.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 06:32:45 -0800 (PST) Date: Mon, 14 Nov 2022 14:32:43 +0000 From: Wei Liu To: Miguel Ojeda 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 v1 27/28] rust: types: add `Either` type Message-ID: References: <20221110164152.26136-1-ojeda@kernel.org> <20221110164152.26136-28-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221110164152.26136-28-ojeda@kernel.org> X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Thu, Nov 10, 2022 at 05:41:39PM +0100, Miguel Ojeda 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, > } > > Signed-off-by: Wedson Almeida Filho > [Reworded, adapted for upstream and applied latest changes] > Signed-off-by: Miguel Ojeda Reviewed-by: Wei Liu