Skip to content

Commit

Permalink
Simplify Workspace.Project.project_type/1
Browse files Browse the repository at this point in the history
  • Loading branch information
pnezis committed Oct 4, 2024
1 parent bc5187b commit e34b030
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions workspace/lib/workspace/project.ex
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,7 @@ defmodule Workspace.Project do
that the project is a root workspace project.
"""
@spec project_type(config :: keyword()) :: nil | atom()
def project_type(config) do
config
|> Keyword.get(:workspace, [])
|> Keyword.get(:type)
end
def project_type(config), do: get_in(config, [:workspace, :type])

@doc """
Returns a map including the key properties of the given project.
Expand Down

0 comments on commit e34b030

Please sign in to comment.