transaction: slightly simplify write_commit() by using store()

This commit is contained in:
Martin von Zweigbergk 2021-01-30 18:38:46 -08:00
parent 49d386931d
commit a28fe7b388

View file

@ -87,13 +87,7 @@ impl<'r> Transaction<'r> {
}
pub fn write_commit(&mut self, commit: store::Commit) -> Commit {
let commit = self
.repo
.as_ref()
.unwrap()
.repo
.store()
.write_commit(commit);
let commit = self.store().write_commit(commit);
self.add_head(&commit);
commit
}