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



##########
File path: src/aegis/src/aegis.erl
##########
@@ -33,50 +31,47 @@ init_db(#{} = Db, Options) ->
         is_encrypted => aegis_server:init_db(Db, Options)
     }.
 
-
 open_db(#{} = Db) ->
     Db#{
         is_encrypted => aegis_server:open_db(Db)
     }.
 
-
 get_db_info(#{is_encrypted := IsEncrypted} = Db) ->
-    KeyManagerInfo = case erlang:function_exported(?AEGIS_KEY_MANAGER, 
get_db_info, 1) of
-        true ->
-            ?AEGIS_KEY_MANAGER:get_db_info(Db);
-        false ->
-            []
-    end,
+    KeyManagerInfo =
+        case erlang:function_exported(?AEGIS_KEY_MANAGER, get_db_info, 1) of
+            true ->
+                ?AEGIS_KEY_MANAGER:get_db_info(Db);
+            false ->
+                []
+        end,
     [{enabled, IsEncrypted}, {key_manager, {KeyManagerInfo}}].
 
-
 encrypt(#{} = _Db, _Key, <<>>) ->
     <<>>;
-
 encrypt(#{is_encrypted := false}, _Key, Value) when is_binary(Value) ->
     Value;
-
-encrypt(#{is_encrypted := true} = Db, Key, Value)
-        when is_binary(Key), is_binary(Value) ->
+encrypt(#{is_encrypted := true} = Db, Key, Value) when
+    is_binary(Key), is_binary(Value)
+->
     aegis_server:encrypt(Db, Key, Value).
 
-
 decrypt(#{} = Db, Rows) when is_list(Rows) ->
-    lists:map(fun({Key, Value}) ->
-        {Key, decrypt(Db, Key, Value)}
-    end, Rows).
+    lists:map(
+        fun({Key, Value}) ->
+            {Key, decrypt(Db, Key, Value)}
+        end,
+        Rows
+    ).
 
 decrypt(#{} = _Db, _Key, <<>>) ->
     <<>>;
-
 decrypt(#{is_encrypted := false}, _Key, Value) when is_binary(Value) ->
     Value;
-
-decrypt(#{is_encrypted := true} = Db, Key, Value)
-        when is_binary(Key), is_binary(Value) ->
+decrypt(#{is_encrypted := true} = Db, Key, Value) when
+    is_binary(Key), is_binary(Value)
+->

Review comment:
       Is there a way to not have the function arrow on a newline like this? 
Definitely not a fan hehe.




-- 
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