We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a062ec commit 985e87eCopy full SHA for 985e87e
alloc/src/fmt.rs
@@ -278,6 +278,19 @@
278
//! Hello, ` 123` has 3 right-aligned characters
279
//! ```
280
//!
281
+//! When truncuating these values, Rust uses round-to-even, which may
282
+//! cause concern when formatting for scientific notation. For example,
283
+//!
284
+//! ```
285
+//! print!("{0:.1$e}", 12345, 3);
286
287
288
+//! Would return:
289
290
+//! ```text
291
+//! 1.234e4
292
293
294
//! ## Localization
295
296
//! In some programming languages, the behavior of string formatting functions
0 commit comments