Skip to content

Commit bf0bb8f

Browse files
committed
fix: simplify
1 parent 459d999 commit bf0bb8f

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/couch/src/couch_db_updater.erl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,7 @@ sort_and_tag_grouped_docs(Client, GroupedDocs) ->
265265
% The merge_updates function will fail and the database can end up with
266266
% duplicate documents if the incoming groups are not sorted, so as a sanity
267267
% check we sort them again here. See COUCHDB-2735.
268-
Cmp = fun
269-
% TODO: re-evaluate this addition, might be
270-
%([], []) -> false;
271-
% superflous now
272-
([#doc{id = A} | _], [#doc{id = B} | _]) -> A < B
273-
end,
268+
Cmp = fun([#doc{id = A} | _], [#doc{id = B} | _]) -> A < B end,
274269
lists:map(
275270
fun(DocGroup) ->
276271
[{Client, maybe_tag_doc(D)} || D <- DocGroup]
@@ -780,7 +775,6 @@ update_docs_int(Db, DocsList, LocalDocs, MergeConflicts, UserCtx) ->
780775

781776
{ok, commit_data(Db1), UpdatedDDocIds}.
782777

783-
784778
% at this point, we already validated this Db is access enabled, so do the checks right away.
785779
check_access(Db, UserCtx, Access) -> couch_db:check_access(Db#db{user_ctx = UserCtx}, Access).
786780

0 commit comments

Comments
 (0)