From patchwork Thu Dec 13 02:43:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 1012481 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43FdQZ2X9pz9s7T for ; Thu, 13 Dec 2018 13:48:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43FdQZ0xjKzDqKD for ; Thu, 13 Dec 2018 13:48:06 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au X-Original-To: snowpatch@lists.ozlabs.org Delivered-To: snowpatch@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43FdKq6L8czDqW2 for ; Thu, 13 Dec 2018 13:43:59 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: by ozlabs.org (Postfix, from userid 1034) id 43FdKq2Q2Gz9s9G; Thu, 13 Dec 2018 13:43:59 +1100 (AEDT) From: Michael Ellerman To: snowpatch@lists.ozlabs.org Date: Thu, 13 Dec 2018 13:43:52 +1100 Message-Id: <20181213024353.19725-2-mpe@ellerman.id.au> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181213024353.19725-1-mpe@ellerman.id.au> References: <20181213024353.19725-1-mpe@ellerman.id.au> X-Mailman-Approved-At: Thu, 13 Dec 2018 13:48:00 +1100 Subject: [snowpatch] [PATCH 2/3] Use git2::Error explicitly in settings.rs X-BeenThere: snowpatch@lists.ozlabs.org X-Mailman-Version: 2.1.29 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" So that we can use std:error:Error as Error. Reviewed-by: Andrew Donnellan --- src/settings.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/settings.rs b/src/settings.rs index 241580b36e20..a5513728fbaa 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -18,7 +18,8 @@ use toml; use serde::de::{self, Deserialize, Deserializer, MapAccess, Visitor}; -use git2::{Error, Repository}; +use git2; +use git2::Repository; use std::collections::BTreeMap; use std::fmt; @@ -69,7 +70,7 @@ pub struct Project { } impl Project { - pub fn get_repo(&self) -> Result { + pub fn get_repo(&self) -> Result { Repository::open(&self.repository) } }