From d1a04b9b0c99a5540d00c9517cff63d6e7275275 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Fri, 4 Jun 2021 14:45:53 -0700 Subject: [PATCH] Cleanup lint. --- rtiow/renderer/src/human.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/rtiow/renderer/src/human.rs b/rtiow/renderer/src/human.rs index 70a4472..f098b6e 100644 --- a/rtiow/renderer/src/human.rs +++ b/rtiow/renderer/src/human.rs @@ -9,25 +9,21 @@ //! use renderer::human; //! //! // "1.00 k" -//! let tmpStr = human::Formatter::new() -//! .format(1000.0); +//! let tmpStr = human::Formatter::new().format(1000.0); //! # assert_eq!(tmpStr, "1.00 k"); //! //! // "1.00 M" -//! let tmpStr2 = human::Formatter::new() -//! .format(1000000.0); +//! let tmpStr2 = human::Formatter::new().format(1000000.0); //! # assert_eq!(tmpStr2, "1.00 M"); //! //! // "1.00 B" -//! let tmpStr3 = human::Formatter::new() -//! .format(1000000000.0); +//! let tmpStr3 = human::Formatter::new().format(1000000000.0); //! # assert_eq!(tmpStr3, "1.00 B"); //! ``` //! //! If you are so inspired you can even try playing with units and customizing your `Scales` //! //! For more examples you should review the examples on github: [tests/demo.rs](https://github.com/BobGneu/human-format-rs/blob/master/tests/demo.rs) -//! #[derive(Debug)] struct ScaledValue { @@ -130,7 +126,7 @@ impl Formatter { let magnitude_multiplier = self.scales.get_magnitude_multipler(&suffix); - (result * magnitude_multiplier) + result * magnitude_multiplier } }