Skip to content

Commit 4116832

Browse files
authored
chore: correct gibibyte spelling (#508)
1 parent 3b55c14 commit 4116832

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

metrics-observer/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ fn f64_data_to_displayable(value: f64, unit: Unit) -> String {
211211
let offset = match unit {
212212
Unit::Kibibytes => 1,
213213
Unit::Mebibytes => 2,
214-
Unit::Gigibytes => 3,
214+
Unit::Gibibytes => 3,
215215
Unit::Tebibytes => 4,
216216
_ => 0,
217217
};

metrics/src/common.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ pub enum Unit {
8484
Nanoseconds,
8585
/// Tebibytes.
8686
///
87-
/// One tebibyte is equal to 1024 gigibytes.
87+
/// One tebibyte is equal to 1024 gibibytes.
8888
Tebibytes,
89-
/// Gigibytes.
89+
/// Gibibytes.
9090
///
91-
/// One gigibyte is equal to 1024 mebibytes.
92-
Gigibytes,
91+
/// One gibibyte is equal to 1024 mebibytes.
92+
Gibibytes,
9393
/// Mebibytes.
9494
///
9595
/// One mebibyte is equal to 1024 kibibytes.
@@ -133,7 +133,7 @@ impl Unit {
133133
Unit::Microseconds => "microseconds",
134134
Unit::Nanoseconds => "nanoseconds",
135135
Unit::Tebibytes => "tebibytes",
136-
Unit::Gigibytes => "gigibytes",
136+
Unit::Gibibytes => "gibibytes",
137137
Unit::Mebibytes => "mebibytes",
138138
Unit::Kibibytes => "kibibytes",
139139
Unit::Bytes => "bytes",
@@ -161,7 +161,7 @@ impl Unit {
161161
Unit::Microseconds => "μs",
162162
Unit::Nanoseconds => "ns",
163163
Unit::Tebibytes => "TiB",
164-
Unit::Gigibytes => "GiB",
164+
Unit::Gibibytes => "GiB",
165165
Unit::Mebibytes => "MiB",
166166
Unit::Kibibytes => "KiB",
167167
Unit::Bytes => "B",
@@ -186,7 +186,7 @@ impl Unit {
186186
"microseconds" => Some(Unit::Microseconds),
187187
"nanoseconds" => Some(Unit::Nanoseconds),
188188
"tebibytes" => Some(Unit::Tebibytes),
189-
"gigibytes" => Some(Unit::Gigibytes),
189+
"gibibytes" => Some(Unit::Gibibytes),
190190
"mebibytes" => Some(Unit::Mebibytes),
191191
"kibibytes" => Some(Unit::Kibibytes),
192192
"bytes" => Some(Unit::Bytes),
@@ -210,7 +210,7 @@ impl Unit {
210210
matches!(
211211
self,
212212
Unit::Tebibytes
213-
| Unit::Gigibytes
213+
| Unit::Gibibytes
214214
| Unit::Mebibytes
215215
| Unit::Kibibytes
216216
| Unit::Bytes
@@ -294,7 +294,7 @@ mod tests {
294294
Unit::Microseconds,
295295
Unit::Nanoseconds,
296296
Unit::Tebibytes,
297-
Unit::Gigibytes,
297+
Unit::Gibibytes,
298298
Unit::Mebibytes,
299299
Unit::Kibibytes,
300300
Unit::Bytes,

0 commit comments

Comments
 (0)