Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
tweak(interaction/externals): some-unwrap results
Browse files Browse the repository at this point in the history
This way we can more consistently support Some(nothing) return values of
loaders and storage backends.
  • Loading branch information
tecosaur committed May 23, 2024
1 parent ee7fcab commit 36509b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/interaction/externals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function _read(dataset::DataSet, as::Type)
if !isnothing(datahandle)
result = @advise dataset load(loader, datahandle, as)
if !isnothing(result)
return result
return something(result)
end
end
end
Expand Down Expand Up @@ -310,7 +310,7 @@ function Base.open(data::DataSet, as::Type; write::Bool=false)
if any(t -> (as, t, mod=data.collection.mod), storage_provider.type)
result = @advise data storage(storage_provider, as; write)
if !isnothing(result)
return result
return something(result)
end
end
end
Expand Down

0 comments on commit 36509b9

Please sign in to comment.