Skip to content

Commit

Permalink
Refactor error
Browse files Browse the repository at this point in the history
  • Loading branch information
omus authored Feb 3, 2022
1 parent dd0a99e commit 28b1414
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/s3path.jl
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,8 @@ ArrowTypes.JuliaType(::Val{S3PATH_ARROW_NAME}, ::Any) = S3Path
ArrowTypes.fromarrow(::Type{<:S3Path}, uri_string) = S3Path(uri_string)

function ArrowTypes.toarrow(path::S3Path)
isnothing(path.config) || throw(
ArgumentError(
"`path.config` must be `nothing` to serialize `path::S3Path` to Arrow"
),
)
if !isnothing(path.config)
throw(ArgumentError("`S3Path` config must be `nothing` to serialize to Arrow"))
end
return string(path)
end

0 comments on commit 28b1414

Please sign in to comment.