1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use super::GitRepo; use core::errors::*; /// An update callback. #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub enum Update<'a> { /// A git repository that needs updating. GitRepo(&'a GitRepo), } impl<'a> Update<'a> { /// Execute the specified update. pub fn update(&self) -> Result<()> { use self::Update::*; match *self { GitRepo(ref git_repo) => git_repo.update(), } } }