Skip to content

Commit

Permalink
Fix test warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
YuhanLiin committed Jul 12, 2024
1 parent 938cb35 commit ac9ed88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/basic-proto/src/int_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn encode() {
basic.set_int32_num(-1);
assert_eq!(basic.compute_size(), 11);
// Regardless of the int type, fixed numbers have fixed size
basic.set_sfixed32_num(i64::min_value());
basic.set_sfixed32_num(i64::MIN);
assert_eq!(basic.compute_size(), 16);

let mut encoder = PbEncoder::new(vec![]);
Expand Down
4 changes: 2 additions & 2 deletions tests/basic-proto/src/no_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn decode_varint() {
);
let len = decoder.as_reader().len();
basic.decode(&mut decoder, len).unwrap();
assert_eq!(basic.int64_num(), Some(&i64::min_value()));
assert_eq!(basic.int64_num(), Some(&i64::MIN));

let mut decoder = PbDecoder::new(
[
Expand All @@ -163,7 +163,7 @@ fn decode_varint() {
let len = decoder.as_reader().len();
basic.decode(&mut decoder, len).unwrap();
assert_eq!(basic.uint32_num(), Some(&150));
assert_eq!(basic.uint64_num(), Some(&u64::max_value()));
assert_eq!(basic.uint64_num(), Some(&u64::MAX));

let mut decoder = PbDecoder::new(
[
Expand Down

0 comments on commit ac9ed88

Please sign in to comment.