rust/library/alloc
Evan Jones ab2151cbf8 std::fmt: Use args directly in example code
The lint "clippy::uninlined_format_args" recommends inline
variables in format strings. Fix two places in the docs that do
not do this. I noticed this because I copy/pasted one example in
to my project, then noticed this lint error. This fixes:

error: variables can be used directly in the `format!` string
  --> src/main.rs:30:22
   |
30 |         let string = format!("{:.*}", decimals, magnitude);
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: variables can be used directly in the `format!` string
  --> src/main.rs:39:2
   |
39 |  write!(&mut io::stdout(), "{}", args).unwrap();
2022-12-17 13:43:08 -05:00
..
benches enable fuzzy_provenance_casts lint in liballoc 2022-11-20 19:12:18 +01:00
src std::fmt: Use args directly in example code 2022-12-17 13:43:08 -05:00
tests Apply review feedback; Fix no_global_oom_handling build 2022-12-08 22:08:55 -08:00
Cargo.toml