Use MAX associated const (#9196)

* Use MAX associated const
This commit is contained in:
Squirrel
2021-06-24 11:53:49 +01:00
committed by GitHub
parent 09d9c2c9f6
commit ea1f21a904
56 changed files with 178 additions and 178 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ mod tests {
(H160::from_low_u64_be(16), "0x0000000000000000000000000000000000000010"),
(H160::from_low_u64_be(1_000), "0x00000000000000000000000000000000000003e8"),
(H160::from_low_u64_be(100_000), "0x00000000000000000000000000000000000186a0"),
(H160::from_low_u64_be(u64::max_value()), "0x000000000000000000000000ffffffffffffffff"),
(H160::from_low_u64_be(u64::MAX), "0x000000000000000000000000ffffffffffffffff"),
];
for (number, expected) in tests {
@@ -61,7 +61,7 @@ mod tests {
(H256::from_low_u64_be(16), "0x0000000000000000000000000000000000000000000000000000000000000010"),
(H256::from_low_u64_be(1_000), "0x00000000000000000000000000000000000000000000000000000000000003e8"),
(H256::from_low_u64_be(100_000), "0x00000000000000000000000000000000000000000000000000000000000186a0"),
(H256::from_low_u64_be(u64::max_value()), "0x000000000000000000000000000000000000000000000000ffffffffffffffff"),
(H256::from_low_u64_be(u64::MAX), "0x000000000000000000000000000000000000000000000000ffffffffffffffff"),
];
for (number, expected) in tests {
@@ -282,7 +282,7 @@ impl Capabilities {
/// Return an object representing all capabilities enabled.
pub fn all() -> Self {
Self(u8::max_value())
Self(u8::MAX)
}
/// Return capabilities for rich offchain calls.
+2 -2
View File
@@ -39,8 +39,8 @@ mod tests {
($name::from(16), "0x10"),
($name::from(1_000), "0x3e8"),
($name::from(100_000), "0x186a0"),
($name::from(u64::max_value()), "0xffffffffffffffff"),
($name::from(u64::max_value()) + $name::from(1), "0x10000000000000000"),
($name::from(u64::MAX), "0xffffffffffffffff"),
($name::from(u64::MAX) + $name::from(1), "0x10000000000000000"),
];
for (number, expected) in tests {