Skip to content

Commit 0a516ad

Browse files
committed
Fix JSON serialization error test.
The test was broken by version 1.0.105 of serde_json, due to serde-rs/json#1055 .
1 parent 88c940b commit 0a516ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redis/tests/test_module_json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ fn test_module_json_serialize_error() {
3030
// so numbers and strings, anything else will cause the serialization to fail
3131
// this is basically the only way to make a serialization fail at runtime
3232
// since rust doesnt provide the necessary ability to enforce this
33-
pub invalid_json: HashMap<bool, i64>,
33+
pub invalid_json: HashMap<Option<bool>, i64>,
3434
}
3535

3636
let mut test_invalid_value: InvalidSerializedStruct = InvalidSerializedStruct {
3737
invalid_json: HashMap::new(),
3838
};
3939

40-
test_invalid_value.invalid_json.insert(true, 2i64);
40+
test_invalid_value.invalid_json.insert(None, 2i64);
4141

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

0 commit comments

Comments
 (0)