Files
n8n-openai-adapter/lib
Michał Muskała 8be8a6a4ea Optimize interpolation for calls that always return strings (#6203)
It is very common to have "#{inspect(foo)}" calls inside strings,
especially when producing error messages. Since we know Kernel.inspect/2
always returns a string, we can safely drop the wrapping
String.Chars.to_string/1 call that is otherwise always present during
interpolation.

Functions to recognize were determined by analyzing all the elixir projects
I have downloaded to disk (about 18k files with possible duplicates) and
checking the most common occurrences of function calls inside interpolation that
always return strings. Kernel.inspect/2 was by far the major winner (with over
8000 uses). Macro.to_string/2, Path.join/1,2 and Enum.join/2 were also
quite frequent with more than 200 uses. For completeness I also included
Enum.map_join/3 and String.Chars.to_string/1 itself. The list can be easily
extended in the future should such a need arise.
2017-06-08 15:43:59 +02:00
..
2017-06-06 22:04:23 +02:00
2017-06-06 22:04:23 +02:00