Skip to content

Commit 1ad2982

Browse files
topolarityKristofferC
authored andcommitted
Libdl: Improve inference for string(::LazyLibraryPath) (#57721)
Make this function `--trim` compatible. (cherry picked from commit 8edc2b3)
1 parent d8af2ed commit 1ad2982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/libdl.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ struct LazyLibraryPath
334334
LazyLibraryPath(pieces::Vector) = new(pieces)
335335
end
336336
LazyLibraryPath(args...) = LazyLibraryPath(collect(args))
337-
Base.string(llp::LazyLibraryPath) = joinpath(string.(llp.pieces)...)::String
337+
Base.string(llp::LazyLibraryPath) = joinpath(String[string(p) for p in llp.pieces])
338338
Base.cconvert(::Type{Cstring}, llp::LazyLibraryPath) = Base.cconvert(Cstring, string(llp))
339339
# Define `print` so that we can wrap this in a `LazyString`
340340
Base.print(io::IO, llp::LazyLibraryPath) = print(io, string(llp))

0 commit comments

Comments
 (0)