Skip to content

Fix some documentation issues #14668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,11 +782,11 @@ impl<T> Vec<T> {
self.as_mut_slice().sort_by(compare)
}

/// Returns a slice of `self` between `start` and `end`.
/// Returns a slice of self spanning the interval [`start`, `end`).
///
/// # Failure
///
/// Fails when `start` or `end` point outside the bounds of `self`, or when
/// Fails when the slice (or part of it) is outside the bounds of self, or when
/// `start` > `end`.
///
/// # Example
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@ impl<T> Container for ~[T] {
/// Extension methods for vectors
pub trait ImmutableVector<'a, T> {
/**
* Returns a slice of self between `start` and `end`.
* Returns a slice of self spanning the interval [`start`, `end`).
*
* Fails when `start` or `end` point outside the bounds of self,
* Fails when the slice (or part of it) is outside the bounds of self,
* or when `start` > `end`.
*/
fn slice(&self, start: uint, end: uint) -> &'a [T];
Expand Down
8 changes: 8 additions & 0 deletions src/libnum/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,8 @@ impl FromStrRadix for BigUint {

impl BigUint {
/// Creates and initializes a `BigUint`.
///
/// The digits are be in base 2^32.
#[inline]
pub fn new(v: Vec<BigDigit>) -> BigUint {
// omit trailing zeros
Expand All @@ -665,6 +667,8 @@ impl BigUint {
}

/// Creates and initializes a `BigUint`.
///
/// The digits are be in base 2^32.
#[inline]
pub fn from_slice(slice: &[BigDigit]) -> BigUint {
return BigUint::new(Vec::from_slice(slice));
Expand Down Expand Up @@ -1315,12 +1319,16 @@ impl<R: Rng> RandBigInt for R {

impl BigInt {
/// Creates and initializes a BigInt.
///
/// The digits are be in base 2^32.
#[inline]
pub fn new(sign: Sign, v: Vec<BigDigit>) -> BigInt {
BigInt::from_biguint(sign, BigUint::new(v))
}

/// Creates and initializes a `BigInt`.
///
/// The digits are be in base 2^32.
#[inline]
pub fn from_biguint(sign: Sign, data: BigUint) -> BigInt {
if sign == Zero || data.is_zero() {
Expand Down