Skip to content

Commit 51b4069

Browse files
Port a version from master
Per request from @hairyhum.
1 parent cdbd560 commit 51b4069

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/rabbit_plugins.erl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,12 @@ plugin_names(Plugins) ->
454454
[Name || #plugin{name = Name} <- Plugins].
455455

456456
lookup_plugins(Names, AllPlugins) ->
457-
[P || P = #plugin{name = Name} <- AllPlugins, lists:member(Name, Names)].
457+
%% Preserve order of Names
458+
lists:map(
459+
fun(Name) ->
460+
lists:keyfind(Name, #plugin.name, AllPlugins)
461+
end,
462+
Names).
458463

459464
%% Split PATH-like value into its components.
460465
split_path(PathString) ->

0 commit comments

Comments
 (0)