json: replaced deprecated type byte with u8 (#19905)

This commit is contained in:
Kim Shrier 2023-11-17 01:47:41 -07:00 committed by GitHub
parent 439aeeffa0
commit 722fe40a2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -486,11 +486,11 @@ fn test_encode_sumtype_defined_ahead() {
}
struct StByteArray {
ba []byte
ba []u8
}
fn test_byte_array() {
assert json.encode(StByteArray{ ba: [byte(1), 2, 3, 4, 5] }) == '{"ba":[1,2,3,4,5]}'
assert json.encode(StByteArray{ ba: [u8(1), 2, 3, 4, 5] }) == '{"ba":[1,2,3,4,5]}'
}
struct Aa {