From b02ee12aaafb7310bdde39cae391e85763cd8cc2 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Sat, 2 Apr 2022 13:22:53 +0100 Subject: [PATCH] Make code more legible --- lib/src/doc/merge.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/src/doc/merge.rs b/lib/src/doc/merge.rs index 64fdec4c..e76d0232 100644 --- a/lib/src/doc/merge.rs +++ b/lib/src/doc/merge.rs @@ -43,13 +43,17 @@ impl<'a> Document<'a> { } } } - Data::PatchExpression(v) => self.current.to_mut().patch(ctx, opt, txn, v).await?, - Data::MergeExpression(v) => self.current.to_mut().merge(ctx, opt, txn, v).await?, - Data::ReplaceExpression(v) => { - self.current.to_mut().replace(ctx, opt, txn, v).await? + Data::PatchExpression(data) => { + self.current.to_mut().patch(ctx, opt, txn, data).await? } - Data::ContentExpression(v) => { - self.current.to_mut().replace(ctx, opt, txn, v).await? + Data::MergeExpression(data) => { + self.current.to_mut().merge(ctx, opt, txn, data).await? + } + Data::ReplaceExpression(data) => { + self.current.to_mut().replace(ctx, opt, txn, data).await? + } + Data::ContentExpression(data) => { + self.current.to_mut().replace(ctx, opt, txn, data).await? } _ => unreachable!(), };