From a28fe7b38849cd86b8112c8e1f4e25097e604a10 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sat, 30 Jan 2021 18:38:46 -0800 Subject: [PATCH] transaction: slightly simplify write_commit() by using store() --- lib/src/transaction.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/src/transaction.rs b/lib/src/transaction.rs index bb67bc8a4..6fc0245e7 100644 --- a/lib/src/transaction.rs +++ b/lib/src/transaction.rs @@ -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 }