mirror of
https://github.com/valitydev/elixir-thrift.git
synced 2024-11-07 02:35:17 +00:00
Ebert cleanup
This commit is contained in:
parent
282374481d
commit
93fa959733
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user