1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

replace occurences of str collect with str join (#436)

This commit is contained in:
Darren Schroeder 2023-04-03 08:47:25 -05:00 committed by GitHub
parent 2cc5b58209
commit b7a45fbcca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 117 additions and 117 deletions

View file

@ -14,7 +14,7 @@ seq 0 $height | par-each {|| # create these in parallel
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str collect)
} | str join)
print -n $"($row_data)" | table
$nothing
} | compact

View file

@ -14,9 +14,9 @@ seq 0 $height | each { |row|
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str collect)
} | str join)
print -n $"($row_data)(char newline)"
} | str collect
} | str join
def iter_inc [incr mult iter] {
$incr + $mult * $iter

View file

@ -22,9 +22,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char newline)"
} | str collect
} | str join
} | math avg)
@ -42,9 +42,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 2 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -61,9 +61,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 3 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -82,9 +82,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"($ansi1)($fgcolor)m(char sp)($ansi2)"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 4 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -101,9 +101,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 5 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -120,9 +120,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 6 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -139,9 +139,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print 'collating tests'

View file

@ -23,9 +23,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char newline)"
} | str collect
} | str join
} | math avg)
@ -43,9 +43,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 2 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -62,9 +62,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 3 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -83,9 +83,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"($ansi1)($fgcolor)m(char sp)($ansi2)"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 4 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -102,9 +102,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 5 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -121,9 +121,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print $"running test 6 at (date now | date format '%Y-%m-%d %H:%M:%S.%3f')"
@ -140,9 +140,9 @@ if ($is_release | str downcase | str trim) == "y" {
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str collect)
} | str join)
$"($row_data)(char cr)"
} | str collect
} | str join
} | math avg)
print 'collating tests'