Skip to content

Commit

Permalink
tweak(Core/externals): add read1/open type asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
tecosaur committed Oct 12, 2024
1 parent 1391403 commit ea3f0f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/src/interaction/externals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ The advisable implementation of `read(dataset::DataSet, as::Type)`, which see.
This is essentially an exercise in useful indirection.
"""
function read1(dataset::DataSet, as::Type)
function read1(dataset::DataSet, as::Type)::as
for loader in dataset.loaders
l_steps = typesteps(loader, as)
isempty(l_steps) && continue
Expand Down Expand Up @@ -272,7 +272,7 @@ This executes the following component of the overall data flow:
Storage ◀────▶ Data Information
```
"""
function Base.open(data::DataSet, as::Type; write::Bool=false)
function Base.open(data::DataSet, as::Type; write::Bool=false)::Union{as, Nothing}
for storage_provider in data.storage
for (_, Tout) in typesteps(storage_provider, as; write)
result = @advise data storage(storage_provider, Tout; write)
Expand Down

0 comments on commit ea3f0f4

Please sign in to comment.