iilyak commented on a change in pull request #3568:
URL: https://github.com/apache/couchdb/pull/3568#discussion_r635195651



##########
File path: src/couch/src/couch_att.erl
##########
@@ -474,17 +471,20 @@ read_data(Fun, Att) when is_function(Fun) ->
             WriterFun = fun
                 ({0, Footers}, {Len, Acc}) ->
                     F = mochiweb_headers:from_binary(Footers),
-                    Md5 = case mochiweb_headers:get_value("Content-MD5", F) of
-                        undefined -> undefined;
-                        Value -> base64:decode(Value)
-                    end,
+                    Md5 =
+                        case mochiweb_headers:get_value("Content-MD5", F) of
+                            undefined -> undefined;
+                            Value -> base64:decode(Value)
+                        end,
                     Props0 = [
                         {data, iolist_to_binary(lists:reverse(Acc))},
                         {att_len, Len}
                     ],
-                    Props1 = if InMd5 /= md5_in_footer -> Props0; true ->
-                        [{md5, Md5} | Props0]
-                    end,
+                    Props1 =
+                        if

Review comment:
       +1. I never liked this convention. Where we put `if ....; true ->`. I 
agree it is easier to type but I always had to stop and use additional mental 
power. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to