Skip to content

Commit

Permalink
Formatted with JuliaFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu17g committed Oct 9, 2021
1 parent f448b34 commit 0ed29c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ end
function _fromtable(
sch::Tables.Schema{names,types},
rows;
name::String="",
name::String = "",
)::IFeatureLayer where {names,types}
# TODO maybe constrain `names` and `types` types
strnames = string.(sch.names)
Expand Down Expand Up @@ -173,15 +173,15 @@ end

function _fromtable(
::Tables.Schema{names,nothing},
rows;
name::String="",
rows;
name::String = "",
)::IFeatureLayer where {names}
cols = Tables.columns(rows)
types = (eltype(collect(col)) for col in cols)
return _fromtable(Tables.Schema(names, types), rows; name)
end

function _fromtable(::Nothing, rows, name::String="")::IFeatureLayer
function _fromtable(::Nothing, rows, name::String = "")::IFeatureLayer
state = iterate(rows)
state === nothing && return IFeatureLayer()
row, _ = state
Expand Down Expand Up @@ -225,7 +225,7 @@ Layer: towns
Field 2 (location): [OFTString], missing, New Delhi
```
"""
function IFeatureLayer(table; name::String="")::IFeatureLayer
function IFeatureLayer(table; name::String = "")::IFeatureLayer
# Check tables interface's conformance
!Tables.istable(table) &&
throw(DomainError(table, "$table has not a Table interface"))
Expand Down

0 comments on commit 0ed29c2

Please sign in to comment.