From 531c2a754f5b8a09da28e2e9386835b659158dc2 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Tue, 17 Oct 2017 10:16:01 -0700 Subject: [PATCH] Fix documentation formatting with commonmark enabled This makes formatting correct with the new pulldown-cmark Markdown parser (rust-lang/rust#44229). --- bigint/src/bigint.rs | 8 ++++---- bigint/src/biguint.rs | 6 +++--- complex/src/lib.rs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bigint/src/bigint.rs b/bigint/src/bigint.rs index a4505b1..bf55b89 100644 --- a/bigint/src/bigint.rs +++ b/bigint/src/bigint.rs @@ -1366,7 +1366,7 @@ impl RandBigInt for R { impl BigInt { /// Creates and initializes a BigInt. /// - /// The digits are in little-endian base 2^32. + /// The digits are in little-endian base 232. #[inline] pub fn new(sign: Sign, digits: Vec) -> BigInt { BigInt::from_biguint(sign, BigUint::new(digits)) @@ -1374,7 +1374,7 @@ impl BigInt { /// Creates and initializes a `BigInt`. /// - /// The digits are in little-endian base 2^32. + /// The digits are in little-endian base 232. #[inline] pub fn from_biguint(mut sign: Sign, mut data: BigUint) -> BigInt { if sign == NoSign { @@ -1444,7 +1444,7 @@ impl BigInt { /// Creates and initializes a `BigInt` from an array of bytes in /// two's complement binary representation. /// - /// The digits are in big-endian base 2^8. + /// The digits are in big-endian base 28. #[inline] pub fn from_signed_bytes_be(digits: &[u8]) -> BigInt { let sign = match digits.first() { @@ -1465,7 +1465,7 @@ impl BigInt { /// Creates and initializes a `BigInt` from an array of bytes in two's complement. /// - /// The digits are in little-endian base 2^8. + /// The digits are in little-endian base 28. #[inline] pub fn from_signed_bytes_le(digits: &[u8]) -> BigInt { let sign = match digits.last() { diff --git a/bigint/src/biguint.rs b/bigint/src/biguint.rs index 367e66e..28d1e90 100644 --- a/bigint/src/biguint.rs +++ b/bigint/src/biguint.rs @@ -1325,7 +1325,7 @@ pub fn to_str_radix_reversed(u: &BigUint, radix: u32) -> Vec { impl BigUint { /// Creates and initializes a `BigUint`. /// - /// The digits are in little-endian base 2^32. + /// The digits are in little-endian base 232. #[inline] pub fn new(digits: Vec) -> BigUint { BigUint { data: digits }.normalized() @@ -1333,7 +1333,7 @@ impl BigUint { /// Creates and initializes a `BigUint`. /// - /// The digits are in little-endian base 2^32. + /// The digits are in little-endian base 232. #[inline] pub fn from_slice(slice: &[BigDigit]) -> BigUint { BigUint::new(slice.to_vec()) @@ -1341,7 +1341,7 @@ impl BigUint { /// Assign a value to a `BigUint`. /// - /// The digits are in little-endian base 2^32. + /// The digits are in little-endian base 232. #[inline] pub fn assign_from_slice(&mut self, slice: &[BigDigit]) { self.data.resize(slice.len(), 0); diff --git a/complex/src/lib.rs b/complex/src/lib.rs index ba00743..70416c7 100644 --- a/complex/src/lib.rs +++ b/complex/src/lib.rs @@ -132,8 +132,8 @@ impl Complex { pub fn arg(&self) -> T { self.im.atan2(self.re) } - /// Convert to polar form (r, theta), such that `self = r * exp(i - /// * theta)` + /// Convert to polar form (r, theta), such that + /// `self = r * exp(i * theta)` #[inline] pub fn to_polar(&self) -> (T, T) { (self.norm(), self.arg())