Skip to content

Remove empty Details#initialize method in endpoint.cr #1151

@hahwul

Description

@hahwul

Description

src/models/endpoint.cr (lines 130–131) defines an empty initialize method for the Details struct:

struct Details
  include JSON::Serializable
  include YAML::Serializable
  property code_paths : Array(PathInfo) = [] of PathInfo
  property status_code : Int32?
  property technology : String?

  # + New details types to be added in the future..

  def initialize
  end
  ...

Since all properties already have default values (empty array and nil), Crystal will auto-generate a no-arg initializer. The explicit empty def initialize; end is redundant.

Additionally, the comment on line 128 has a minor formatting issue — trailing double periods (..) and a + prefix.

Suggested fix

- # + New details types to be added in the future..
-
- def initialize
- end

If the comment is still relevant, clean it up:

# New details types can be added in the future.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions