From 4d6aadc5dd92e101d9f418c0eca0c076b81a3079 Mon Sep 17 00:00:00 2001 From: CAESIUS_TIM <60285058+CAESIUS-TIM@users.noreply.github.com> Date: Wed, 1 Apr 2026 11:07:51 +0800 Subject: [PATCH 1/2] doc: change filesize unit tip to warning for clarity Change from tip to warning to highlight potential pitfall: case does not distinguish between bits and bytes. --- lang-guide/chapters/types/basic_types/filesize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang-guide/chapters/types/basic_types/filesize.md b/lang-guide/chapters/types/basic_types/filesize.md index f4f2d127176..90eef6d3a4f 100644 --- a/lang-guide/chapters/types/basic_types/filesize.md +++ b/lang-guide/chapters/types/basic_types/filesize.md @@ -25,7 +25,7 @@ The full list of `filesize` units is: | `PB`: petabytes | `PiB`: pebibytes | | `EB`: exabytes | `EiB`: exbibytes | -::: tip +::: warning File size units are case-insensitive. E.g., `1KiB`, `1kib`, and `1Kib` are all equivalent. ::: From a8d41afbc9e74d16af2341827a832ba8617aa22e Mon Sep 17 00:00:00 2001 From: CAESIUS_TIM <60285058+CAESIUS-TIM@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:46:11 +0800 Subject: [PATCH 2/2] docs: add warning to avoid confusing filesize byte with bit --- lang-guide/chapters/types/basic_types/filesize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang-guide/chapters/types/basic_types/filesize.md b/lang-guide/chapters/types/basic_types/filesize.md index 90eef6d3a4f..8c9ec0f06a1 100644 --- a/lang-guide/chapters/types/basic_types/filesize.md +++ b/lang-guide/chapters/types/basic_types/filesize.md @@ -26,7 +26,7 @@ The full list of `filesize` units is: | `EB`: exabytes | `EiB`: exbibytes | ::: warning -File size units are case-insensitive. E.g., `1KiB`, `1kib`, and `1Kib` are all equivalent. +File size units are case-insensitive. E.g., `1KiB`, `1kib`, and `1Kib` are all equivalent. Do not confuse it with bit! ::: ## Common commands that can work with `filesizes`