Rust – Expected at least one digit in exponent

I am writing a physics-based Rust project using Clippy as the analysis tool, and have the following code: const G: f64 = 6.67430e-11; const C: i32 = 299792458; const PLANK_CONSTANT: f64 = 6.62607015e−34; // error The error states that I should have at least one digit in the exponent, but as you can see there… Read More Rust – Expected at least one digit in exponent

How to pretty-print inlined variables when formatting strings

Normally one can print strings the following way: println!("{:#?}", foo) where the {:#?} syntax will make a pretty-print of the value. But I know it’s also possible to inline the variable directly in the string between the curly braces, instead of listing it as a second argument to the macro, like so: println!("{foo}"). My question… Read More How to pretty-print inlined variables when formatting strings