Skip to content

Commit

Permalink
Fix JSON serialization error test.
Browse files Browse the repository at this point in the history
The test was broken by version 1.0.105 of serde_json, due to
serde-rs/json#1055 .
  • Loading branch information
nihohit committed Aug 16, 2023
1 parent d33c92d commit c883099
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redis/tests/test_module_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ fn test_module_json_serialize_error() {
// so numbers and strings, anything else will cause the serialization to fail
// this is basically the only way to make a serialization fail at runtime
// since rust doesnt provide the necessary ability to enforce this
pub invalid_json: HashMap<bool, i64>,
pub invalid_json: HashMap<Option<bool>, i64>,
}

let mut test_invalid_value: InvalidSerializedStruct = InvalidSerializedStruct {
invalid_json: HashMap::new(),
};

test_invalid_value.invalid_json.insert(true, 2i64);
test_invalid_value.invalid_json.insert(None, 2i64);

let set_invalid: RedisResult<bool> = con.json_set(TEST_KEY, "$", &test_invalid_value);

Expand Down

0 comments on commit c883099

Please sign in to comment.