Skip to content

Commit

Permalink
[#28] Updated zipper functions after renaming edit_all to fmap
Browse files Browse the repository at this point in the history
  • Loading branch information
jfacorro committed Apr 27, 2015
1 parent 1422a9a commit ba1b3b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/elvis_style.erl
Original file line number Diff line number Diff line change
Expand Up @@ -766,12 +766,12 @@ find_repeated_nodes(Root, MinComplexity) ->

-spec remove_attrs_zipper(zipper:zipper(), map()) -> ktn_code:tree_node().
remove_attrs_zipper(Zipper, TypeAttrs) ->
zipper:edit_all(fun remove_attrs/2, [TypeAttrs], Zipper).
zipper:fmap(fun remove_attrs/2, [TypeAttrs], Zipper).

-spec remove_attrs(ktn_code:tree_node() | [ktn_code:tree_node()], map()) ->
ktn_code:tree_node().
remove_attrs(Nodes, TypeAttrs) when is_list(Nodes) ->
ktn_lists:map(fun remove_attrs/2, [TypeAttrs], Nodes);
[remove_attrs(Node, TypeAttrs) || Node <- Nodes];
remove_attrs(#{attrs := Attrs,
type := Type,
node_attrs := NodeAttrs} = Node,
Expand Down

0 comments on commit ba1b3b9

Please sign in to comment.