Ebert cleanup

This commit is contained in:
Dan Swain 2017-02-10 17:12:17 -05:00
parent 282374481d
commit 93fa959733
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ defmodule Thrift.Generator do
defp generate_const_modules(schema) do
# schema.constants is a map %{name: constant} but constant includes the
# name and all we really need is the values
#
#
# we also only want constants that are defined in the main file from this
# file group
constants = schema.constants

View File

@ -197,7 +197,7 @@ defmodule Thrift.Parser.FileGroup do
# this should eventually be replaced if we find a way to only parse files
# once
@spec own_constant?(t, Constant.t) :: boolean
def own_constant?(file_group, constant = %Constant{}) do
def own_constant?(file_group, %Constant{} = constant) do
basename = Path.basename(file_group.initial_file, ".thrift")
initial_file = file_group.parsed_files[basename]
Enum.member?(Map.keys(initial_file.schema.constants), constant.name)