Improve impletament of emqttd_topic:match/2
This commit is contained in:
parent
d5c54276e2
commit
4c8b43e05d
|
@ -61,9 +61,9 @@ wildcard([_H|T]) ->
|
||||||
-spec(match(Name, Filter) -> boolean() when
|
-spec(match(Name, Filter) -> boolean() when
|
||||||
Name :: topic() | words(),
|
Name :: topic() | words(),
|
||||||
Filter :: topic() | words()).
|
Filter :: topic() | words()).
|
||||||
match(<<"$", _/binary>>, <<"+", _/binary>>) ->
|
match(<<$$, _/binary>>, <<$+, _/binary>>) ->
|
||||||
false;
|
false;
|
||||||
match(<<"$", _/binary>>, <<"#", _/binary>>) ->
|
match(<<$$, _/binary>>, <<$#, _/binary>>) ->
|
||||||
false;
|
false;
|
||||||
match(Name, Filter) when is_binary(Name) and is_binary(Filter) ->
|
match(Name, Filter) when is_binary(Name) and is_binary(Filter) ->
|
||||||
match(words(Name), words(Filter));
|
match(words(Name), words(Filter));
|
||||||
|
|
Loading…
Reference in New Issue