[snowpatch] [PATCH 2/3] Use git2::Error explicitly in settings.rs

Andrew Donnellan andrew.donnellan at au1.ibm.com
Thu Dec 13 13:59:06 AEDT 2018


On 13/12/18 1:43 pm, Michael Ellerman wrote:
> So that we can use std:error:Error as Error.

Looks good

With missing SOB line fixed:

Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

> ---
>   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<Repository, Error> {
> +    pub fn get_repo(&self) -> Result<Repository, git2::Error> {
>           Repository::open(&self.repository)
>       }
>   }
> 

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the snowpatch mailing list