From 8e1ffac89d3e320a84c2e551048f2d7400563322 Mon Sep 17 00:00:00 2001 From: nujz Date: Sun, 20 Sep 2020 09:08:04 +0800 Subject: [PATCH] modify unit test --- router/src/url.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/router/src/url.rs b/router/src/url.rs index b5d6d8a6..255b7465 100644 --- a/router/src/url.rs +++ b/router/src/url.rs @@ -230,8 +230,7 @@ mod tests { fn test_from_hex() { let hex = b"0123456789abcdefABCDEF"; - let max = u8::MAX as i32 + 1; - for i in 0..max { + for i in 0..256 { let c = i as u8; if hex.contains(&c) { assert!(from_hex(c).is_some())