Skip to content

Commit

Permalink
Fix documentation formatting with commonmark enabled
Browse files Browse the repository at this point in the history
This makes formatting correct with the new pulldown-cmark Markdown
parser (rust-lang/rust#44229).
  • Loading branch information
mbrubeck committed Oct 17, 2017
1 parent 741a5a6 commit 531c2a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions bigint/src/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1366,15 +1366,15 @@ impl<R: Rng> 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 2<sup>32</sup>.
#[inline]
pub fn new(sign: Sign, digits: Vec<BigDigit>) -> BigInt {
BigInt::from_biguint(sign, BigUint::new(digits))
}

/// 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]
pub fn from_biguint(mut sign: Sign, mut data: BigUint) -> BigInt {
if sign == NoSign {
Expand Down Expand Up @@ -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 2<sup>8</sup>.
#[inline]
pub fn from_signed_bytes_be(digits: &[u8]) -> BigInt {
let sign = match digits.first() {
Expand All @@ -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 2<sup>8</sup>.
#[inline]
pub fn from_signed_bytes_le(digits: &[u8]) -> BigInt {
let sign = match digits.last() {
Expand Down
6 changes: 3 additions & 3 deletions bigint/src/biguint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1325,23 +1325,23 @@ pub fn to_str_radix_reversed(u: &BigUint, radix: u32) -> Vec<u8> {
impl 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]
pub fn new(digits: Vec<BigDigit>) -> BigUint {
BigUint { data: digits }.normalized()
}

/// 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]
pub fn from_slice(slice: &[BigDigit]) -> BigUint {
BigUint::new(slice.to_vec())
}

/// 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]
pub fn assign_from_slice(&mut self, slice: &[BigDigit]) {
self.data.resize(slice.len(), 0);
Expand Down
4 changes: 2 additions & 2 deletions complex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ impl<T: Clone + Float> Complex<T> {
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())
Expand Down

0 comments on commit 531c2a7

Please sign in to comment.