mirror of https://github.com/fafhrd91/actix-web
fix: use explicit u64 type suffix in ContentLength tests
Fix compilation errors where integer literals in equality and ordering tests defaulted to i32, which doesn't implement PartialEq/PartialOrd with ContentLength after changing its internal type from usize to u64. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
15ea560863
commit
5f78c9ceb1
|
|
@ -255,14 +255,14 @@ mod tests {
|
|||
#[test]
|
||||
fn equality() {
|
||||
assert!(ContentLength(0) == ContentLength(0));
|
||||
assert!(ContentLength(0) == 0);
|
||||
assert!(0 != ContentLength(123));
|
||||
assert!(ContentLength(0) == 0u64);
|
||||
assert!(0u64 != ContentLength(123));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ordering() {
|
||||
assert!(ContentLength(0) < ContentLength(123));
|
||||
assert!(ContentLength(0) < 123);
|
||||
assert!(0 < ContentLength(123));
|
||||
assert!(ContentLength(0) < 123u64);
|
||||
assert!(0u64 < ContentLength(123));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue