From 69245901dc31f68c67a64c0fc67f18b719eb8006 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Thu, 9 Jan 2020 11:29:09 +0100 Subject: [PATCH] Update `per_thing` docs (#4575) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update `per_thing` docs * Update primitives/arithmetic/src/per_things.rs Co-Authored-By: Bastian Köcher * Update per_things.rs Co-authored-by: Bastian Köcher --- substrate/primitives/arithmetic/src/per_things.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/primitives/arithmetic/src/per_things.rs b/substrate/primitives/arithmetic/src/per_things.rs index 8c732248a3..f10df9a1c2 100644 --- a/substrate/primitives/arithmetic/src/per_things.rs +++ b/substrate/primitives/arithmetic/src/per_things.rs @@ -54,7 +54,7 @@ macro_rules! implement_per_thing { Self([parts, $max][(parts > $max) as usize]) } - /// Converts from a percent. Equal to `x / 100`. + /// Converts a percent into `Self`. Equal to `x / 100`. /// /// This can be created at compile time. pub const fn from_percent(x: $type) -> Self { @@ -69,7 +69,7 @@ macro_rules! implement_per_thing { Self::from_rational_approximation(p, q) } - /// Converts a fraction into `Permill`. + /// Converts a fraction into `Self`. #[cfg(feature = "std")] pub fn from_fraction(x: f64) -> Self { Self((x * ($max as f64)) as $type) }