[snowpatch] [PATCH 2/3] Use git2::Error explicitly in settings.rs
Michael Ellerman
mpe at ellerman.id.au
Thu Dec 13 13:43:52 AEDT 2018
So that we can use std:error:Error as Error.
---
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)
}
}
--
2.17.2
More information about the snowpatch
mailing list