From 051d340171a93a3d401aaaea46b4b62fa81e5d7c Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 14 Dec 2020 19:42:01 +0000 Subject: [PATCH] Use bytes1 and avoid using the obsolete byte type (#2438) --- contracts/utils/Strings.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/utils/Strings.sol b/contracts/utils/Strings.sol index adaa6886b..5842448b3 100644 --- a/contracts/utils/Strings.sol +++ b/contracts/utils/Strings.sol @@ -26,7 +26,7 @@ library Strings { uint256 index = digits - 1; temp = value; while (temp != 0) { - buffer[index--] = byte(uint8(48 + temp % 10)); + buffer[index--] = bytes1(uint8(48 + temp % 10)); temp /= 10; } return string(buffer);