From 708efaa812dc81409b7e30c5572a939485a19fdb Mon Sep 17 00:00:00 2001 From: David Peter Date: Tue, 27 Jul 2021 08:56:14 +0200 Subject: [PATCH] Literal separators --- src/filter/size.rs | 102 ++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/src/filter/size.rs b/src/filter/size.rs index d6eaf14..5435b19 100644 --- a/src/filter/size.rs +++ b/src/filter/size.rs @@ -93,70 +93,70 @@ mod tests { kilo_plus: ("+1k", SizeFilter::Min(1000)), kilo_plus_suffix: ("+1kb", SizeFilter::Min(1000)), kilo_minus: ("-1k", SizeFilter::Max(1000)), - kilo_minus_multiplier: ("-100k", SizeFilter::Max(100000)), + kilo_minus_multiplier: ("-100k", SizeFilter::Max(100_000)), kilo_minus_suffix: ("-1kb", SizeFilter::Max(1000)), kilo_plus_upper: ("+1K", SizeFilter::Min(1000)), kilo_plus_suffix_upper: ("+1KB", SizeFilter::Min(1000)), kilo_minus_upper: ("-1K", SizeFilter::Max(1000)), kilo_minus_suffix_upper: ("-1Kb", SizeFilter::Max(1000)), kibi_plus: ("+1ki", SizeFilter::Min(1024)), - kibi_plus_multiplier: ("+10ki", SizeFilter::Min(10240)), + kibi_plus_multiplier: ("+10ki", SizeFilter::Min(10_240)), kibi_plus_suffix: ("+1kib", SizeFilter::Min(1024)), kibi_minus: ("-1ki", SizeFilter::Max(1024)), - kibi_minus_multiplier: ("-100ki", SizeFilter::Max(102400)), + kibi_minus_multiplier: ("-100ki", SizeFilter::Max(102_400)), kibi_minus_suffix: ("-1kib", SizeFilter::Max(1024)), kibi_plus_upper: ("+1KI", SizeFilter::Min(1024)), kibi_plus_suffix_upper: ("+1KiB", SizeFilter::Min(1024)), kibi_minus_upper: ("-1Ki", SizeFilter::Max(1024)), kibi_minus_suffix_upper: ("-1KIB", SizeFilter::Max(1024)), - mega_plus: ("+1m", SizeFilter::Min(1000000)), - mega_plus_suffix: ("+1mb", SizeFilter::Min(1000000)), - mega_minus: ("-1m", SizeFilter::Max(1000000)), - mega_minus_suffix: ("-1mb", SizeFilter::Max(1000000)), - mega_plus_upper: ("+1M", SizeFilter::Min(1000000)), - mega_plus_suffix_upper: ("+1MB", SizeFilter::Min(1000000)), - mega_minus_upper: ("-1M", SizeFilter::Max(1000000)), - mega_minus_suffix_upper: ("-1Mb", SizeFilter::Max(1000000)), - mebi_plus: ("+1mi", SizeFilter::Min(1048576)), - mebi_plus_suffix: ("+1mib", SizeFilter::Min(1048576)), - mebi_minus: ("-1mi", SizeFilter::Max(1048576)), - mebi_minus_suffix: ("-1mib", SizeFilter::Max(1048576)), - mebi_plus_upper: ("+1MI", SizeFilter::Min(1048576)), - mebi_plus_suffix_upper: ("+1MiB", SizeFilter::Min(1048576)), - mebi_minus_upper: ("-1Mi", SizeFilter::Max(1048576)), - mebi_minus_suffix_upper: ("-1MIB", SizeFilter::Max(1048576)), - giga_plus: ("+1g", SizeFilter::Min(1000000000)), - giga_plus_suffix: ("+1gb", SizeFilter::Min(1000000000)), - giga_minus: ("-1g", SizeFilter::Max(1000000000)), - giga_minus_suffix: ("-1gb", SizeFilter::Max(1000000000)), - giga_plus_upper: ("+1G", SizeFilter::Min(1000000000)), - giga_plus_suffix_upper: ("+1GB", SizeFilter::Min(1000000000)), - giga_minus_upper: ("-1G", SizeFilter::Max(1000000000)), - giga_minus_suffix_upper: ("-1Gb", SizeFilter::Max(1000000000)), - gibi_plus: ("+1gi", SizeFilter::Min(1073741824)), - gibi_plus_suffix: ("+1gib", SizeFilter::Min(1073741824)), - gibi_minus: ("-1gi", SizeFilter::Max(1073741824)), - gibi_minus_suffix: ("-1gib", SizeFilter::Max(1073741824)), - gibi_plus_upper: ("+1GI", SizeFilter::Min(1073741824)), - gibi_plus_suffix_upper: ("+1GiB", SizeFilter::Min(1073741824)), - gibi_minus_upper: ("-1Gi", SizeFilter::Max(1073741824)), - gibi_minus_suffix_upper: ("-1GIB", SizeFilter::Max(1073741824)), - tera_plus: ("+1t", SizeFilter::Min(1000000000000)), - tera_plus_suffix: ("+1tb", SizeFilter::Min(1000000000000)), - tera_minus: ("-1t", SizeFilter::Max(1000000000000)), - tera_minus_suffix: ("-1tb", SizeFilter::Max(1000000000000)), - tera_plus_upper: ("+1T", SizeFilter::Min(1000000000000)), - tera_plus_suffix_upper: ("+1TB", SizeFilter::Min(1000000000000)), - tera_minus_upper: ("-1T", SizeFilter::Max(1000000000000)), - tera_minus_suffix_upper: ("-1Tb", SizeFilter::Max(1000000000000)), - tebi_plus: ("+1ti", SizeFilter::Min(1099511627776)), - tebi_plus_suffix: ("+1tib", SizeFilter::Min(1099511627776)), - tebi_minus: ("-1ti", SizeFilter::Max(1099511627776)), - tebi_minus_suffix: ("-1tib", SizeFilter::Max(1099511627776)), - tebi_plus_upper: ("+1TI", SizeFilter::Min(1099511627776)), - tebi_plus_suffix_upper: ("+1TiB", SizeFilter::Min(1099511627776)), - tebi_minus_upper: ("-1Ti", SizeFilter::Max(1099511627776)), - tebi_minus_suffix_upper: ("-1TIB", SizeFilter::Max(1099511627776)), + mega_plus: ("+1m", SizeFilter::Min(1_000_000)), + mega_plus_suffix: ("+1mb", SizeFilter::Min(1_000_000)), + mega_minus: ("-1m", SizeFilter::Max(1_000_000)), + mega_minus_suffix: ("-1mb", SizeFilter::Max(1_000_000)), + mega_plus_upper: ("+1M", SizeFilter::Min(1_000_000)), + mega_plus_suffix_upper: ("+1MB", SizeFilter::Min(1_000_000)), + mega_minus_upper: ("-1M", SizeFilter::Max(1_000_000)), + mega_minus_suffix_upper: ("-1Mb", SizeFilter::Max(1_000_000)), + mebi_plus: ("+1mi", SizeFilter::Min(1_048_576)), + mebi_plus_suffix: ("+1mib", SizeFilter::Min(1_048_576)), + mebi_minus: ("-1mi", SizeFilter::Max(1_048_576)), + mebi_minus_suffix: ("-1mib", SizeFilter::Max(1_048_576)), + mebi_plus_upper: ("+1MI", SizeFilter::Min(1_048_576)), + mebi_plus_suffix_upper: ("+1MiB", SizeFilter::Min(1_048_576)), + mebi_minus_upper: ("-1Mi", SizeFilter::Max(1_048_576)), + mebi_minus_suffix_upper: ("-1MIB", SizeFilter::Max(1_048_576)), + giga_plus: ("+1g", SizeFilter::Min(1_000_000_000)), + giga_plus_suffix: ("+1gb", SizeFilter::Min(1_000_000_000)), + giga_minus: ("-1g", SizeFilter::Max(1_000_000_000)), + giga_minus_suffix: ("-1gb", SizeFilter::Max(1_000_000_000)), + giga_plus_upper: ("+1G", SizeFilter::Min(1_000_000_000)), + giga_plus_suffix_upper: ("+1GB", SizeFilter::Min(1_000_000_000)), + giga_minus_upper: ("-1G", SizeFilter::Max(1_000_000_000)), + giga_minus_suffix_upper: ("-1Gb", SizeFilter::Max(1_000_000_000)), + gibi_plus: ("+1gi", SizeFilter::Min(1_073_741_824)), + gibi_plus_suffix: ("+1gib", SizeFilter::Min(1_073_741_824)), + gibi_minus: ("-1gi", SizeFilter::Max(1_073_741_824)), + gibi_minus_suffix: ("-1gib", SizeFilter::Max(1_073_741_824)), + gibi_plus_upper: ("+1GI", SizeFilter::Min(1_073_741_824)), + gibi_plus_suffix_upper: ("+1GiB", SizeFilter::Min(1_073_741_824)), + gibi_minus_upper: ("-1Gi", SizeFilter::Max(1_073_741_824)), + gibi_minus_suffix_upper: ("-1GIB", SizeFilter::Max(1_073_741_824)), + tera_plus: ("+1t", SizeFilter::Min(1_000_000_000_000)), + tera_plus_suffix: ("+1tb", SizeFilter::Min(1_000_000_000_000)), + tera_minus: ("-1t", SizeFilter::Max(1_000_000_000_000)), + tera_minus_suffix: ("-1tb", SizeFilter::Max(1_000_000_000_000)), + tera_plus_upper: ("+1T", SizeFilter::Min(1_000_000_000_000)), + tera_plus_suffix_upper: ("+1TB", SizeFilter::Min(1_000_000_000_000)), + tera_minus_upper: ("-1T", SizeFilter::Max(1_000_000_000_000)), + tera_minus_suffix_upper: ("-1Tb", SizeFilter::Max(1_000_000_000_000)), + tebi_plus: ("+1ti", SizeFilter::Min(1_099_511_627_776)), + tebi_plus_suffix: ("+1tib", SizeFilter::Min(1_099_511_627_776)), + tebi_minus: ("-1ti", SizeFilter::Max(1_099_511_627_776)), + tebi_minus_suffix: ("-1tib", SizeFilter::Max(1_099_511_627_776)), + tebi_plus_upper: ("+1TI", SizeFilter::Min(1_099_511_627_776)), + tebi_plus_suffix_upper: ("+1TiB", SizeFilter::Min(1_099_511_627_776)), + tebi_minus_upper: ("-1Ti", SizeFilter::Max(1_099_511_627_776)), + tebi_minus_suffix_upper: ("-1TIB", SizeFilter::Max(1_099_511_627_776)), } /// Invalid parse testing