diff --git a/Cargo.toml b/Cargo.toml index 9ddaa98..b4540d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/configcat/rust-sdk" documentation = "https://configcat.com/docs/sdk-reference/rust" keywords = ["configcat", "feature-flag", "feature-toggle"] license = "MIT" -version = "0.1.5" +version = "0.1.6" edition = "2021" [dependencies] diff --git a/LICENSE b/LICENSE index a052037..522b34d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 ConfigCat +Copyright (c) 2026 ConfigCat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/eval/evaluator.rs b/src/eval/evaluator.rs index dbc5105..60cde56 100644 --- a/src/eval/evaluator.rs +++ b/src/eval/evaluator.rs @@ -958,10 +958,11 @@ fn eval_array_contains( return Success(needs_true); } } - } - for comp_item in comp_val { - if user_item == comp_item { - return Success(needs_true); + } else { + for comp_item in comp_val { + if user_item == comp_item { + return Success(needs_true); + } } } } diff --git a/tests/data/testmatrix_comparators_v6.csv b/tests/data/testmatrix_comparators_v6.csv index d53efb5..1e49298 100644 --- a/tests/data/testmatrix_comparators_v6.csv +++ b/tests/data/testmatrix_comparators_v6.csv @@ -22,3 +22,4 @@ admin@configcat.com;admin@configcat.com;France;["Read", "Write", "execute"];Fal admin@configcat.com;admin@configcat.com;France;["Read", "Write", "eXecute"];False;Cat;Cat;Dog;Dog;Dog;Cat;Dog;Cat;Cat;Dog;Dog;Cat;Falcon;NotFound;Horse;Cat;Dog;Cat;Cat;Dog;Dog;Cat;Cat;Dog;Dog;Cat;Cat;Dog;Dog user@configcat.com;user@configcat.com;Greece;["","execute"];False;Cat;Cat;Dog;Dog;Cat;Dog;Dog;Cat;Cat;Dog;Cat;Dog;Horse;NotFound;Horse;Cat;Dog;Cat;Cat;Dog;Dog;Cat;Cat;Dog;Dog;Dog;Dog;Cat;Cat user@configcat.com;user@configcat.com;Monaco;,null, ,,nil, None;False;Cat;Cat;Dog;Dog;Cat;Dog;Dog;Cat;Cat;Cat;Cat;Cat;Falcon;NotFound;Horse;Cat;Dog;Cat;Cat;Dog;Dog;Cat;Cat;Dog;Dog;Cat;Cat;Cat;Cat +user@configcat.com;user@configcat.com;Greece;[];False;Cat;Cat;Dog;Dog;Cat;Dog;Dog;Cat;Cat;Dog;Cat;Dog;Falcon;NotFound;Horse;Cat;Dog;Cat;Cat;Dog;Dog;Cat;Cat;Dog;Dog;Cat;Cat;Dog;Dog