Skip to content

Commit

Permalink
variables are for using!
Browse files Browse the repository at this point in the history
  • Loading branch information
novaugust committed Dec 6, 2023
1 parent bf348cb commit daf9270
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/style/module_directives.ex
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ defmodule Styler.Style.ModuleDirectives do
uses = (directives[:use] || []) |> Enum.flat_map(&expand_directive/1) |> reset_newlines()
imports = expand_and_sort(directives[:import] || [])
requires = expand_and_sort(directives[:require] || [])
original_aliases = directives[:alias] || []
aliases = expand_and_sort(directives[:alias] || [])
all_aliases = directives[:alias] || []
aliases = expand_and_sort(all_aliases)

directives =
[
Expand All @@ -171,7 +171,7 @@ defmodule Styler.Style.ModuleDirectives do

cond do
# the # of aliases can be decreased during sorting - if there were any, we need to be sure to write the deletion
Enum.empty?(directives) and Enum.empty?(original_aliases) ->
Enum.empty?(directives) and Enum.empty?(all_aliases) ->
parent

Enum.empty?(nondirectives) ->
Expand Down

0 comments on commit daf9270

Please sign in to comment.