浏览代码

Use bytes1 and avoid using the obsolete byte type (#2438)

Alex Beregszaszi 4 年之前
父节点
当前提交
051d340171
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      contracts/utils/Strings.sol

+ 1 - 1
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);