Skip to content

Commit 9071a87

Browse files
Add Branch::get_mut() (#522)
1 parent 850c9b9 commit 9071a87

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/branch.rs

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ impl<'repo> Branch<'repo> {
3333
&self.inner
3434
}
3535

36+
/// Gain mutable access to the reference that is this branch
37+
pub fn get_mut(&mut self) -> &mut Reference<'repo> {
38+
&mut self.inner
39+
}
40+
3641
/// Take ownership of the underlying reference.
3742
pub fn into_reference(self) -> Reference<'repo> {
3843
self.inner

0 commit comments

Comments
 (0)