Skip to content
Prev Previous commit
Next Next commit
Lint error.
  • Loading branch information
JazzGlobal committed Apr 9, 2023
commit e5fd98d2f9cae7537b1e762d3354c0792a4e5308
2 changes: 1 addition & 1 deletion common/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl FormatSpec {
Err(FormatSpecError::UnknownFormatCode(ch, "float"))
}
Some(FormatType::Number(Case::Lower)) => {
Comment thread
DimitrisJim marked this conversation as resolved.
Outdated
let size = magnitude.to_string().replace(".", "").len();
let size = magnitude.to_string().replace('.', '').len();
// If we get a precision larger than the magnitude (without the decimal), use the size.
let precision = if precision > size { size } else { precision };
Ok(float_ops::format_number(magnitude, precision))
Expand Down