Remove lifetimes from Runtime struct
This commit is contained in:
parent
068c731857
commit
ba1b4682d7
2 changed files with 4 additions and 4 deletions
|
@ -26,7 +26,7 @@ use vcs::git::runtime::Runtime;
|
||||||
pub struct CreateHook<'a> {
|
pub struct CreateHook<'a> {
|
||||||
storepath: &'a PathBuf,
|
storepath: &'a PathBuf,
|
||||||
|
|
||||||
runtime: Runtime<'a>,
|
runtime: Runtime,
|
||||||
|
|
||||||
position: HookPosition,
|
position: HookPosition,
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,14 +12,14 @@ use libimagstore::hook::result::HookResult;
|
||||||
use vcs::git::result::Result;
|
use vcs::git::result::Result;
|
||||||
use vcs::git::error::{MapErrInto, GitHookErrorKind as GHEK};
|
use vcs::git::error::{MapErrInto, GitHookErrorKind as GHEK};
|
||||||
|
|
||||||
pub struct Runtime<'a> {
|
pub struct Runtime {
|
||||||
repository: Option<Repository>,
|
repository: Option<Repository>,
|
||||||
config: Option<Value>,
|
config: Option<Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Runtime<'a> {
|
impl Runtime {
|
||||||
|
|
||||||
pub fn new(storepath: &PathBuf) -> Runtime<'a> {
|
pub fn new(storepath: &PathBuf) -> Runtime {
|
||||||
Runtime {
|
Runtime {
|
||||||
repository: match Repository::open(storepath) {
|
repository: match Repository::open(storepath) {
|
||||||
Ok(r) => Some(r),
|
Ok(r) => Some(r),
|
||||||
|
|
Loading…
Reference in a new issue