Skip to content

Commit 8edc2b3

Browse files
authored
Libdl: Improve inference for string(::LazyLibraryPath) (#57721)
Make this function `--trim` compatible.
1 parent 885b1cd commit 8edc2b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/libdl.jl

Lines changed: 1 addition & 1 deletion
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)