Skip to content

Commit b176c15

Browse files
committed
stats: just compare the first byte instead of using starts_with
1 parent 9959129 commit b176c15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/stats.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ impl FieldType {
14961496
{
14971497
if let Ok(int_val) = string.parse::<i64>() {
14981498
// leading zero, its a string (e.g. zip codes)
1499-
if string.starts_with('0') && int_val != 0 {
1499+
if string.as_bytes()[0] == b'0' && int_val != 0 {
15001500
return (TString, None);
15011501
}
15021502
return (TInteger, None);

0 commit comments

Comments
 (0)