Fix documentation formatting with commonmark enabled

This makes formatting correct with the new pulldown-cmark Markdown
parser (rust-lang/rust#44229).
This commit is contained in:
Matt Brubeck 2017-10-17 10:16:01 -07:00
parent 741a5a6207
commit 531c2a754f
3 changed files with 9 additions and 9 deletions

View File

@ -1366,7 +1366,7 @@ impl<R: Rng> RandBigInt for R {
impl BigInt { impl BigInt {
/// Creates and initializes a BigInt. /// Creates and initializes a BigInt.
/// ///
/// The digits are in little-endian base 2^32. /// The digits are in little-endian base 2<sup>32</sup>.
#[inline] #[inline]
pub fn new(sign: Sign, digits: Vec<BigDigit>) -> BigInt { pub fn new(sign: Sign, digits: Vec<BigDigit>) -> BigInt {
BigInt::from_biguint(sign, BigUint::new(digits)) BigInt::from_biguint(sign, BigUint::new(digits))
@ -1374,7 +1374,7 @@ impl BigInt {
/// Creates and initializes a `BigInt`. /// Creates and initializes a `BigInt`.
/// ///
/// The digits are in little-endian base 2^32. /// The digits are in little-endian base 2<sup>32</sup>.
#[inline] #[inline]
pub fn from_biguint(mut sign: Sign, mut data: BigUint) -> BigInt { pub fn from_biguint(mut sign: Sign, mut data: BigUint) -> BigInt {
if sign == NoSign { if sign == NoSign {
@ -1444,7 +1444,7 @@ impl BigInt {
/// Creates and initializes a `BigInt` from an array of bytes in /// Creates and initializes a `BigInt` from an array of bytes in
/// two's complement binary representation. /// two's complement binary representation.
/// ///
/// The digits are in big-endian base 2^8. /// The digits are in big-endian base 2<sup>8</sup>.
#[inline] #[inline]
pub fn from_signed_bytes_be(digits: &[u8]) -> BigInt { pub fn from_signed_bytes_be(digits: &[u8]) -> BigInt {
let sign = match digits.first() { 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. /// 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 2<sup>8</sup>.
#[inline] #[inline]
pub fn from_signed_bytes_le(digits: &[u8]) -> BigInt { pub fn from_signed_bytes_le(digits: &[u8]) -> BigInt {
let sign = match digits.last() { let sign = match digits.last() {

View File

@ -1325,7 +1325,7 @@ pub fn to_str_radix_reversed(u: &BigUint, radix: u32) -> Vec<u8> {
impl BigUint { impl BigUint {
/// Creates and initializes a `BigUint`. /// Creates and initializes a `BigUint`.
/// ///
/// The digits are in little-endian base 2^32. /// The digits are in little-endian base 2<sup>32</sup>.
#[inline] #[inline]
pub fn new(digits: Vec<BigDigit>) -> BigUint { pub fn new(digits: Vec<BigDigit>) -> BigUint {
BigUint { data: digits }.normalized() BigUint { data: digits }.normalized()
@ -1333,7 +1333,7 @@ impl BigUint {
/// Creates and initializes a `BigUint`. /// Creates and initializes a `BigUint`.
/// ///
/// The digits are in little-endian base 2^32. /// The digits are in little-endian base 2<sup>32</sup>.
#[inline] #[inline]
pub fn from_slice(slice: &[BigDigit]) -> BigUint { pub fn from_slice(slice: &[BigDigit]) -> BigUint {
BigUint::new(slice.to_vec()) BigUint::new(slice.to_vec())
@ -1341,7 +1341,7 @@ impl BigUint {
/// Assign a value to a `BigUint`. /// Assign a value to a `BigUint`.
/// ///
/// The digits are in little-endian base 2^32. /// The digits are in little-endian base 2<sup>32</sup>.
#[inline] #[inline]
pub fn assign_from_slice(&mut self, slice: &[BigDigit]) { pub fn assign_from_slice(&mut self, slice: &[BigDigit]) {
self.data.resize(slice.len(), 0); self.data.resize(slice.len(), 0);

View File

@ -132,8 +132,8 @@ impl<T: Clone + Float> Complex<T> {
pub fn arg(&self) -> T { pub fn arg(&self) -> T {
self.im.atan2(self.re) self.im.atan2(self.re)
} }
/// Convert to polar form (r, theta), such that `self = r * exp(i /// Convert to polar form (r, theta), such that
/// * theta)` /// `self = r * exp(i * theta)`
#[inline] #[inline]
pub fn to_polar(&self) -> (T, T) { pub fn to_polar(&self) -> (T, T) {
(self.norm(), self.arg()) (self.norm(), self.arg())