From 9071a87bad3f4ff96ce491f871b0cb1e0ab2549f Mon Sep 17 00:00:00 2001 From: Andrew Hickman Date: Mon, 24 Feb 2020 15:51:17 +0000 Subject: [PATCH] Add `Branch::get_mut()` (#522) --- src/branch.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/branch.rs b/src/branch.rs index 75ae018ec7..c33a18370e 100644 --- a/src/branch.rs +++ b/src/branch.rs @@ -33,6 +33,11 @@ impl<'repo> Branch<'repo> { &self.inner } + /// Gain mutable access to the reference that is this branch + pub fn get_mut(&mut self) -> &mut Reference<'repo> { + &mut self.inner + } + /// Take ownership of the underlying reference. pub fn into_reference(self) -> Reference<'repo> { self.inner