From patchwork Thu Mar 23 01:48:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Donnellan X-Patchwork-Id: 742421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vpTyW5Br2z9s7R for ; Thu, 23 Mar 2017 12:50:11 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vpTyW40KnzDqBv for ; Thu, 23 Mar 2017 12:50:11 +1100 (AEDT) X-Original-To: snowpatch@lists.ozlabs.org Delivered-To: snowpatch@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vpTyQ1N68zDq5g for ; Thu, 23 Mar 2017 12:50:05 +1100 (AEDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2N1nKgg061955 for ; Wed, 22 Mar 2017 21:49:59 -0400 Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by mx0a-001b2d01.pphosted.com with ESMTP id 29b9vpcp16-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 22 Mar 2017 21:49:58 -0400 Received: from localhost by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Mar 2017 11:49:56 +1000 Received: from d23relay08.au.ibm.com (202.81.31.227) by e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 23 Mar 2017 11:49:54 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v2N1nj1134472156 for ; Thu, 23 Mar 2017 12:49:53 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v2N1nJl8013510 for ; Thu, 23 Mar 2017 12:49:19 +1100 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v2N1nISW013243 for ; Thu, 23 Mar 2017 12:49:18 +1100 Received: from ajd.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id EB520A0110 for ; Thu, 23 Mar 2017 12:48:56 +1100 (AEDT) From: Andrew Donnellan To: snowpatch@lists.ozlabs.org Date: Thu, 23 Mar 2017 12:48:50 +1100 X-Mailer: git-send-email 2.11.0 X-TM-AS-MML: disable x-cbid: 17032301-0048-0000-0000-000002165AF5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17032301-0049-0000-0000-000047C202D0 Message-Id: <20170323014850.2414-1-andrew.donnellan@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-23_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703230016 Subject: [snowpatch] [PATCH] clippy warnings: use of assert_eq!() X-BeenThere: snowpatch@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Continuous Integration for patch-based workflows List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: snowpatch-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "snowpatch" Change a couple of assert!()s to assert_eq!() for additional clarity. Signed-off-by: Andrew Donnellan --- Applied to master: c869d952f69e813eb035fa2a7a1672703444008e --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7941a90..6ba550e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -277,9 +277,9 @@ fn main() { panic!("http_proxy is malformed: {:?}, error: {}", proxy_url, e); }); assert!(proxy.has_host()); - assert!(proxy.scheme() == "http"); + assert_eq!(proxy.scheme(), "http"); // This should pass even if no trailing slash is in http_proxy - assert!(proxy.path() == "/"); + assert_eq!(proxy.path(), "/"); let proxy_config = ProxyConfig::new(proxy.scheme(), proxy.host_str().unwrap().to_string(), proxy.port().unwrap_or(80),