From e4dfffd70baf952aa69c65ec6f57bf7ebd32abbc Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 11 Apr 2022 10:21:14 +0300 Subject: [PATCH] toml: remove math import (used only for math.max and math.max_u32) --- vlib/toml/scanner/scanner.v | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vlib/toml/scanner/scanner.v b/vlib/toml/scanner/scanner.v index 7b7d206f4b..7f421227c9 100644 --- a/vlib/toml/scanner/scanner.v +++ b/vlib/toml/scanner/scanner.v @@ -3,14 +3,13 @@ // that can be found in the LICENSE file. module scanner -import math import toml.input import toml.token import toml.util pub const ( digit_extras = [`_`, `.`, `x`, `o`, `b`, `e`, `E`] - end_of_text = math.max_u32 + end_of_text = 4294967295 ) // Scanner contains the necessary fields for the state of the scan process. @@ -346,7 +345,7 @@ fn (mut s Scanner) new_token(kind token.Kind, lit string, len int) token.Token { return token.Token{ kind: kind lit: lit - col: math.max(1, col) + col: if col < 1 { 1 } else { col } line_nr: s.line_nr + 1 pos: s.pos - s.header_len - len + 1 len: len