summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2022-08-20 13:09:29 +0200
committerJan Lehnardt <jan@apache.org>2022-12-16 16:56:18 +0100
commit5b9e274fc2ae089570dd6be2ff1170b1a70f2c84 (patch)
treeacb24ff5052c9b3a51b1f67f9e88dbb9e9243a57
parent691343f0692ec6b10cec45d7b71e3a9273ad9218 (diff)
downloadcouchdb-5b9e274fc2ae089570dd6be2ff1170b1a70f2c84.tar.gz
fix: simplify
-rw-r--r--src/couch/src/couch_db_updater.erl8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/couch/src/couch_db_updater.erl b/src/couch/src/couch_db_updater.erl
index d62485d31..1e5566b21 100644
--- a/src/couch/src/couch_db_updater.erl
+++ b/src/couch/src/couch_db_updater.erl
@@ -265,12 +265,7 @@ sort_and_tag_grouped_docs(Client, GroupedDocs) ->
% The merge_updates function will fail and the database can end up with
% duplicate documents if the incoming groups are not sorted, so as a sanity
% check we sort them again here. See COUCHDB-2735.
- Cmp = fun
- % TODO: re-evaluate this addition, might be
- %([], []) -> false;
- % superflous now
- ([#doc{id = A} | _], [#doc{id = B} | _]) -> A < B
- end,
+ Cmp = fun([#doc{id = A} | _], [#doc{id = B} | _]) -> A < B end,
lists:map(
fun(DocGroup) ->
[{Client, maybe_tag_doc(D)} || D <- DocGroup]
@@ -779,7 +774,6 @@ update_docs_int(Db, DocsList, LocalDocs, MergeConflicts, UserCtx) ->
{ok, commit_data(Db1), UpdatedDDocIds}.
-
% at this point, we already validated this Db is access enabled, so do the checks right away.
check_access(Db, UserCtx, Access) -> couch_db:check_access(Db#db{user_ctx = UserCtx}, Access).